*----------------------------------------------------------------------*
* Contract Renewal Details *
*----------------------------------------------------------------------*
************************************************************************
* Description: The contract details of the customers in a particular *
* sales area are displayed. This report is run to view the *
* * contract details existing for Ypsilon *
* Author : M.Praveen kumar *
* Date : 18 March 2005 *
* *
*----------------------------------------------------------------------*
* Change No Date Details Req No *
*----------------------------------------------------------------------*
* CR-102 18/03/05 Original Version PRDK90011*
* *
************************************************************************
REPORT zadi_sd_contractalv NO STANDARD PAGE HEADING
LINE-COUNT 45(2) LINE-SIZE 130
MESSAGE-ID ymessage.
**********************Type Pool Declaration for ALV********************
TYPE-POOLS: slis.
********************Table Declaration**********************************
TABLES: vbak,vbfa,veda.
*********************Declaring Data Objects****************************
DATA: BEGIN OF lt_sd_c1 OCCURS 0,
vbeln LIKE vbak-vbeln, "Sales Document Number
vbelv LIKE vbfa-vbelv, "Preceding Sales and Distribution Doc
kunnr LIKE vbak-kunnr, "Customer Number
END OF lt_sd_c1.
*data: Lt_Sd_C2 like veda occurs 0 with header line.
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv, "ALV Catalog Table
gs_fieldcat TYPE slis_fieldcat_alv. "ALV Catalog Structure
DATA: BEGIN OF lt_sd_c2 OCCURS 0,
vbeln LIKE veda-vbeln, "Sales Document Number
vlaufz LIKE veda-vlaufz, "Validity Period of Contract
vuntdat LIKE veda-vuntdat, "Date on which Contract was Signed
vbegdat LIKE veda-vbegdat, "Contract Start Date
venddat LIKE veda-venddat, "Contract End Date
END OF lt_sd_c2.
*****************************Selection Screen***************************
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-101.
SELECT-OPTIONS: s_vkorg FOR vbak-vkorg OBLIGATORY,"Sales organization.
s_vtweg FOR vbak-vtweg, "Distribution channel.
s_spart FOR vbak-spart, "Division.
s_kunnr FOR vbak-kunnr, "Customer number
p_dat FOR sy-datum."Date=current date
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK c1 WITH FRAME TITLE text-100.
PARAMETERS list RADIOBUTTON GROUP radi.
PARAMETERS alv RADIOBUTTON GROUP radi.
SELECTION-SCREEN END OF BLOCK c1.
*****************Validation of Selection Screen Fields******************
AT SELECTION-SCREEN.
SELECT SINGLE vkorg FROM tvko INTO vbak-vkorg WHERE vkorg IN s_vkorg.
IF sy-subrc <> 0.
MESSAGE e002.
ENDIF.
SELECT SINGLE vtweg FROM tvkov INTO vbak-vtweg WHERE vtweg IN s_vtweg.
IF sy-subrc <> 0.
MESSAGE e004.
ENDIF.
SELECT SINGLE spart FROM tspa INTO vbak-spart WHERE spart IN s_spart.
IF sy-subrc <> 0.
MESSAGE e006.
ENDIF.
SELECT SINGLE kunnr FROM kna1 INTO vbak-kunnr WHERE kunnr IN s_kunnr.
IF sy-subrc <> 0.
MESSAGE e007.
ENDIF.
*********************************Data Fetching**************************
START-OF-SELECTION.
SELECT a~vbeln a~kunnr b~vbelv
FROM vbak AS a INNER JOIN vbfa AS b
ON a~vbeln = b~vbeln
INTO CORRESPONDING FIELDS OF TABLE lt_sd_c1
WHERE vkorg IN s_vkorg
AND vtweg IN s_vtweg
AND spart IN s_spart
AND kunnr IN s_kunnr.
IF NOT lt_sd_c1[] IS INITIAL.
SELECT vbeln vlaufz vuntdat vbegdat venddat
FROM veda INTO CORRESPONDING FIELDS OF TABLE lt_sd_c2
FOR ALL ENTRIES IN lt_sd_c1
WHERE vbeln = lt_sd_c1-vbelv
AND venddat = p_dat.
ELSE.
MESSAGE i005.
EXIT.
ENDIF.
END-OF-SELECTION.
*******************************Display of Data**************************
IF list = 'X'.
LOOP AT lt_sd_c2.
WRITE:/0 sy-vline,
lt_sd_c2-vbeln UNDER 'SALES DOCUMENT', 16 sy-vline,
lt_sd_c2-vuntdat UNDER 'CONTRACT SINGED DATE', 42 sy-vline,
lt_sd_c2-vbegdat UNDER 'CONTRACT START DATE', 65 sy-vline,
lt_sd_c2-venddat UNDER 'CONTRACT END DATE' COLOR 6, 100 sy-vline,
lt_sd_c2-vlaufz UNDER 'VALIDITY PERIOD OF CONTRACT', 130 sy-vline.
ENDLOOP.
ULINE.
ELSE.
**************Calling a subroutine for Field display in ALV*************
PERFORM built_field_catalog.
*************Calling fucntion module for ALV****************************
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_background_id = 'ALV_BACKGROUND'
i_grid_title = 'Contract Details'
* i_structure_name = 'veda'
it_fieldcat = gt_fieldcat[]
TABLES
t_outtab = lt_sd_c2.
ENDIF.
**************************Header for the page***************************
TOP-OF-PAGE.
WRITE:/ 'CREATED BY : ', sy-uname,
102 'CREATED ON :', sy-datum,
/1(130) sy-uline .
WRITE:/ sy-vline, 50 ' CONTRACT DETAILS ' COLOR 5,
111 'Page No:',
sy-pagno,
130 sy-vline.
ULINE.
WRITE:/0 sy-vline,
2 'SALES DOCUMENT' COLOR 3,16 sy-vline,
20 'CONTRACT SIGNED DATE' COLOR 3, 42 sy-vline,
45 'CONTRACT START DATE' COLOR 3, 65 sy-vline,
75 'CONTRACT END DATE' COLOR 3, 100 sy-vline,
102 'VALIDITY PERIOD OF CONTRACT' COLOR 3, 130 sy-vline.
ULINE.
*&---------------------------------------------------------------------*
*& Form built_field_catalog
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM built_field_catalog.
gs_fieldcat-col_pos = '1'.
gs_fieldcat-fieldname = 'VBELN'.
gs_fieldcat-outputlen = 30.
gs_fieldcat-seltext_l = 'SALES DOCUMENT NUMBER'.
APPEND gs_fieldcat TO gt_fieldcat.
gs_fieldcat-col_pos = '2'.
gs_fieldcat-fieldname = 'VLAUFZ'.
gs_fieldcat-outputlen = 9.
gs_fieldcat-seltext_l = 'VALIDITY'.
APPEND gs_fieldcat TO gt_fieldcat.
gs_fieldcat-col_pos = '3'.
gs_fieldcat-fieldname = 'VUNTDAT'.
gs_fieldcat-outputlen = 12.
gs_fieldcat-seltext_l = 'SIGNED DATE'.
APPEND gs_fieldcat TO gt_fieldcat.
gs_fieldcat-col_pos = '4'.
gs_fieldcat-fieldname = 'VBEGDAT'.
gs_fieldcat-outputlen = 12.
gs_fieldcat-seltext_l = 'START DATE'.
APPEND gs_fieldcat TO gt_fieldcat.
gs_fieldcat-col_pos = '5'.
gs_fieldcat-fieldname = 'VENDDAT'.
gs_fieldcat-outputlen = 12.
gs_fieldcat-seltext_l = 'END DATE'.
APPEND gs_fieldcat TO gt_fieldcat.
ENDFORM.
Friday, November 23, 2007
contract renival details using alvs in sap abap
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2007
(952)
-
▼
November
(716)
- SAP Paper Documents
- SAP Repository
- SAP R/3 Implementation and Maintenance Tips
- ABAP/4 programming language overview
- The interactive eLearning system for ABAP™
- Helpful System Administration ABAPS
- free download abap programmin pdf book
- examples of real time objects in sap abap(1)
- examples of real time objects in sap abap
- work flow example2
- Workflow tips
- Miscellaneous sap abap faq
- BDC , LSMW, Conversions faq in abap
- Sap Scripts & Smart forms faqs in abap
- performance tuning in abap faqs
- Real Time BDC & LSMW faqs
- Real Time ABAP Internal Tables faqs
- Real Time ABAP Reports faqs
- Real Time questions ..in sap ABAP
- SAP ABAP FAQ (Technical)
- ABAP and Unicode
- ABAP and JavaScript
- ABAP Objects
- ABAP Database Access
- Running ABAP Programs
- ABAP User Dialogs
- The ABAP Programming Language
- Creating and Changing ABAP Programs
- Overview of the Components of Application Programs
- Introduction to ABAP
- ABAP Programming Documentation
- FREE DOWNLOAD ALE, EDI & IDOCS
- Conversion of IDOCs to XML.pdf
- FREE DOWNLOAD IDOC Interface Technology
- FREE DOWNLOAD EDI, IDOC Interface
- FREE DOWNLOAD IDOC BOOK
- FREE DOWNLOAD LSMW - Idoc Inbound Processing
- FREE DOWNLOAD SAP ABAP Idoc Interface
- FREE DOWNLOAD Java for SAP
- FREE DOWNLOAD Java for ABAP Programmers
- FREE DOWNLOAD Java and BAPI technology for EP
- free download Building Web Services with Java and ...
- free download Enable SAP with the power of Javascript
- FREE DOWNLOAD ABAP Training Simulator
- FREE DOWNLOAD SAP Accounting Training Simulators
- free download SAPScripts Made Easy
- CONDENSE
- CONSTANTS
- ABAP Quick Viewer
- sap abap XXL (EXtended Export of Lists)
- Some ABAP/4 Query header line variable
- Understanding SAP Query
- ABAP/4 Query
- ABAP/4 Query Hints and Tips
- SAP Website Links Exchange for ABAP, Basis or Cons...
- sap abap Program for Generate IDoc
- sap abap program for Reads an existing Idoc and di...
- List of ABAP Function modules
- sap abap FTP programming
- sap abap program for Issuing an Unix Command from ...
- sap abap program for RFC call to get Server List
- sap abap program for A SAP Pop-out Calculator
- sap ABAP program for Timers and Auto-refresh
- sap abap program for WS_EXECUTE to called External...
- sap abap programming Execute DOS Command from ABAP...
- To execute a dos command from ABAP
- sap abap program for Make your SAPGUI Disappear an...
- sap abap program for Using Function Modules F4_FIL...
- abp program for How to Restrict the Select Options
- sap abap program for Take Values from Selection-Sc...
- sap abap program for Change Text Into Password
- sap abap program for Function Module for Encryptio...
- sap abap program for FM VRM_SET_VALUE To List Box
- sap abap program for Value Request For Parameter
- sap abap program for Pop a Message to specific SAP...
- ABAP Pop-out box for user confirmation
- sap ABAP program for POP-UP Window
- sap abap program Sample XML Source Code For SAP
- sap abap XML file to word document through SAP
- sap abap program for How to Write Web Reports in SAP
- sap abap conversion Program to Test Line Selection...
- sap abap program for String Handling in ABAP - Rem...
- sap abap program for Split String into two parts a...
- sap abap conversion Program For Printing Prime Number
- sap abap program for How can I get Ascii value of ...
- sap abap program for Figure to Words for India but...
- sap abap conversion program for Print Number Value...
- sap abap conversion program for Insert a special T...
- sap abap program for String Handling in ABAP - Rem...
- sap abap program for Split String into two parts a...
- sap abap conversion Program For Printing Prime Number
- sap abap program for How can I get Ascii value of ...
- sap abap program for Figure to Words for India but...
- sap abap conversion program for Print Number Value...
- sap abap conversion program for Insert a special T...
- sap abap program for Convert SAP Spool List to HTML
- sap program for Convert Month to Word in ABAP
- ABAP function to convert Number to Words
- sap abap program for How to Create Tree Control
- sap abap A sample Tree Programming
-
▼
November
(716)
No comments:
Post a Comment