‎2008 Jul 23 6:10 AM
Hi Gurus.,
I need to use write statement to display output using Call Screen xxx starting at xx ending at xx as dialog box .. How can i achieve this ...I tried the following in PBO of the screen but only a blank screen comes as output ...
&----
*& Module STATUS_0102 OUTPUT
&----
text
----
MODULE STATUS_0102 OUTPUT.
SET PF-STATUS 'MENU1' OF PROGRAM 'ZHM053C_MB01_J1IFQ_J1IF13'.
SET TITLEBAR 'xxx'.
ULINE.
WRITE: / ' *************EXECUTION SUMMARY************* ' COLOR 4. ULINE.
WRITE / ''.
SKIP 1.
LOOP AT IT_MESS.
IF IT_MESS-MSGTYP EQ 'E'.
FORMAT COLOR 7 .
WRITE : IT_MESS-MESSAGE.
ELSE.
FORMAT COLOR 2 .
WRITE : IT_MESS-MESSAGE.
ENDIF.
AT END OF TCODE.
WRITE / SY-ULINE.
ENDAT.
ENDLOOP.
ENDMODULE. " STATUS_0102 OUTPUT
please help me its very urgent
Regards.,
S.Sivakumar
‎2008 Jul 23 7:01 AM
Hi Sivakumar,
There are some SAP demo programs.
program1 : demo_leave_to_list_processing - calling lists from screens
program2: demo_call_screen_from_list - calling screens from lists
I hope you will understand the logic.
Regards,
Sukhbold
‎2008 Jul 23 7:05 AM
hi
You can code like this,
LOOP AT IT_MESS.
IF IT_MESS-MSGTYP EQ 'E'.
FORMAT COLOR 7 .
message 'your message here' type 'I'.
ELSE.
FORMAT COLOR 2 .
message 'your message here' type 'I'.
ENDIF.
AT END OF TCODE.
WRITE / SY-ULINE.
ENDAT.
ENDLOOP.
‎2008 Jul 23 7:05 AM
Hi,
REPORT demo_leave_to_list_processing .
TABLES sdyn_conn.
DATA: wa_spfli TYPE spfli,
flightdate TYPE sflight-fldate.
CALL SCREEN 100.
MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN_100'.
ENDMODULE.
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE user_command_0100.
CALL SCREEN 500.
SET SCREEN 100.
ENDMODULE.
MODULE call_list_500 OUTPUT.
LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
SET PF-STATUS space.
SUPPRESS DIALOG.
SELECT carrid connid cityfrom cityto
FROM spfli
INTO CORRESPONDING FIELDS OF wa_spfli
WHERE carrid = sdyn_conn-carrid.
WRITE: / wa_spfli-carrid, wa_spfli-connid,
wa_spfli-cityfrom, wa_spfli-cityto.
HIDE: wa_spfli-carrid, wa_spfli-connid.
ENDSELECT.
CLEAR: wa_spfli-carrid.
ENDMODULE.
TOP-OF-PAGE.
WRITE text-001 COLOR COL_HEADING.
ULINE.
TOP-OF-PAGE DURING LINE-SELECTION.
WRITE sy-lisel COLOR COL_HEADING.
ULINE.
AT LINE-SELECTION.
CHECK not wa_spfli-carrid is initial.
SELECT fldate
FROM sflight
INTO flightdate
WHERE carrid = wa_spfli-carrid AND
connid = wa_spfli-connid.
WRITE / flightdate.
ENDSELECT.
CLEAR: wa_spfli-carrid.
This example switches to list processing during the screen processing for screen 100. Screen 100 has a single input field - the component CARRID from the ABAP Dictionary structure SDYN_CONN.
The flow logic of screen 100 is:
PROCESS BEFORE OUTPUT.
MODULE status_0100.
PROCESS AFTER INPUT.
MODULE cancel AT EXIT-COMMAND.
MODULE user_command_0100.
The PAI module user_command_0100 calls screen 500 using the CALL SCREEN statement. This screen encapsulates a basic list. It has the following flow logic:
PROCESS BEFORE OUTPUT.
MODULE call_list_500.
PROCESS AFTER INPUT.
The module call_list_500 defines the basic list and switches to list processing. Since the next screen after list processing is screen 0, screen 500 is a one-screen screen chain. After list processing, control returns to the position in user_command_0100 from which screen 500 was called.
If the user selects a line on the basic list, a detail list appears. This is achieved through the event block AT LINE-SELECTION. The program also contains event blocks for TOP-OF-PAGE and TOP-OF-PAGE DURING LINE-SELECTION, which define page headers for both the basic list and detail list.
Since there is only one list system in this program, there is no need for case distinctions within the list events.
With thanks & regards,
Sravani yendru.
‎2008 Dec 08 4:23 AM