10-15-2008 12:08 AM
Hi All,
I have screen 500, where I will be creating Credit memo and once it is created I want to display the data. Where I should put the code for display data or how I should call it.
WRITE: /01(303) sy-uline.
PERFORM headings.
WRITE: /01(303) sy-uline.
SET PF-STATUS 'LIST'.
PERFORM displaydata.
Please help me.
Thanks,
Veni.
MODULE STATUS_0500 OUTPUT.
SET PF-STATUS 'LIST1'.
loop at gt2_zcoop.
SELECT * FROM zsdcoop INTO TABLE itab where pfnum = gt2_zcoop-pfnum.
endloop.
itab[] = gt2_zcoop[].
READ TABLE itab INTO zsdcoop INDEX cnt.
ENDMODULE. " STATUS_0500 OUTPUT
&----
*& Module USER_COMMAND_0500 INPUT
&----
text
----
MODULE USER_COMMAND_0500 INPUT.
CASE sy-ucomm.
WHEN 'CM-PO1'.
LOOP AT itab INTO gs_zcoop1.
gs_zcoop1-iamount = zsdcoop-iamount.
gs_zcoop1-iamount2 = zsdcoop-iamount2.
gs_zcoop1-iamount3 = zsdcoop-iamount3.
gs_zcoop1-iamount4 = zsdcoop-iamount4.
gs_zcoop1-iamount5 = zsdcoop-iamount5.
gs_zcoop1-iamount6 = zsdcoop-iamount6.
gs_zcoop1-iamount7 = zsdcoop-iamount7.
PERFORM headerdata.
PERFORM texts.
PERFORM itemdata.
APPEND gs_zcoop1 TO gt3_zcoop.
PERFORM call_function.
PERFORM errorcheckandcommit.
CLEAR chbox.
REFRESH partner.
REFRESH item.
REFRESH itemx.
REFRESH lt_schedules_in.
REFRESH lt_schedules_inx.
REFRESH conditions1.
lv_itemno = 10.
CLEAR gs_zcoop1.
Update zsdcoop
set
oamount = zoamount
oamount2 = zoamount2
oamount3 = zoamount3
oamount4 = zoamount4
oamount5 = zoamount5
oamount6 = zoamount6
oamount7 = zoamount7
cmponum = zcmponum
cmponum2 = zcmponum2
cmponum3 = zcmponum3
cmponum4 = zcmponum4
cmponum5 = zcmponum5
cmponum6 = zcmponum6
where kunnr = zsdcoop-kunnr and pfnum = zsdcoop-pfnum.
If sy-subrc EQ 0.
MESSAGE ID '00' TYPE 'I' NUMBER '997' WITH 'Credit Memo' salesdocument 'has been created'.
ENDIF.
REFRESH it_cmpo.
REFRESH gt2_zcoop.
WHEN OTHERS.
SET SCREEN 0. LEAVE SCREEN.
" do nothing
ENDCASE.
ENDMODULE. " USER_COMMAND_0500 INPUT
10-15-2008 1:54 AM
Hi Veni Reddy,
In PBO of that screen 500, switch to LIST PROCESSING as follows,
SUPPRESS DIALOG.
LEAVE TO LIST-PROCESSING.
Now the DYNPRO screen acts as a REPORT screen i.e. LIST OUTPUT.
Now you can use WRITE statement and all.
Here the PBO and PAI of dcreen 500 will execute sequencially.
i.e. first PBO runs and PAI runs even without triggering SY-UCOMM.
If you want to get back from this screen, use the following syntax,
LEAVE TO SCREEN 100.
Here, screen 100 is to get back from screen 500.
Regards,
R.Nagarajan.
-
We can -
10-15-2008 12:55 AM
if you want to display the data in the screen 500 after creating the credit memo.. try using
CALL SCREEN 500
after creating the memo..
Regards,
Suzie
10-15-2008 1:54 AM
Hi Veni Reddy,
In PBO of that screen 500, switch to LIST PROCESSING as follows,
SUPPRESS DIALOG.
LEAVE TO LIST-PROCESSING.
Now the DYNPRO screen acts as a REPORT screen i.e. LIST OUTPUT.
Now you can use WRITE statement and all.
Here the PBO and PAI of dcreen 500 will execute sequencially.
i.e. first PBO runs and PAI runs even without triggering SY-UCOMM.
If you want to get back from this screen, use the following syntax,
LEAVE TO SCREEN 100.
Here, screen 100 is to get back from screen 500.
Regards,
R.Nagarajan.
-
We can -
10-16-2008 5:18 PM