Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Saving Data from subscreen to main screen on a click of a button

Former Member
0 Kudos
295

Hi,

I have a main screen which has multiple subscreens attached to it.

My problem is when ever i enter the data on the screen and execute a button, the data on the screen is not being saved. what i observed is when ever there is a button press, the data is cleared. i have checked the same in debugging mode as well still then i am not able to see the data which i am trying to store.

I have attached the code, please help me in this regards,

Thanks,

Shanky.

Main screen:-

PROCESS BEFORE OUTPUT.

MODULE STATUS_9020.

MODULE MZO_DISABLETABSTRIP.

MODULE CHECK_MANDATORY_DISABLE.

CALL SUBSCREEN SUB1 INCLUDING SY-REPID '9030'.

CALL SUBSCREEN SUB2 INCLUDING SY-REPID '9050'.

CALL SUBSCREEN SUB3 INCLUDING SY-REPID '9060'.

CALL SUBSCREEN SUB4 INCLUDING SY-REPID '9080'.

CALL SUBSCREEN SUB5 INCLUDING SY-REPID '9090'.

CALL SUBSCREEN SUB6 INCLUDING SY-REPID '9070'.

PROCESS AFTER INPUT.

MODULE MZI_USER_COMMAND_9020.

CALL SUBSCREEN SUB1.

CALL SUBSCREEN SUB2.

CALL SUBSCREEN SUB3.

CALL SUBSCREEN SUB4.

CALL SUBSCREEN SUB5.

CALL SUBSCREEN SUB6.

Subscreen - 1

PROCESS BEFORE OUTPUT.

  • MODULE MZO_STATUS_9030.

MODULE MZO_INITIALIZATION_9030.

  • module mzo_routes_display.

*

PROCESS AFTER INPUT.

MODULE MZI_USER_COMMAND_9030.

PROCESS ON VALUE-REQUEST.

FIELD ZTTT001-ZFACTNAME MODULE MZV_ZFACTNAME.

FIELD ZTTT001-ZTTBASICOBJI1 MODULE MZV_ZTTBASICOBJI1.

FIELD ZTTT001-ZTTBASICOBJI2 MODULE MZV_ZTTBASICOBJI2.

FIELD ZTTT001-ZTTBASICOBJI3 MODULE MZV_ZTTBASICOBJI3.

FIELD ZTTT001-ZTTBASICOBJI4 MODULE MZV_ZTTBASICOBJI4.

FIELD ZTTT001-ZTTBASICOBJI5 MODULE MZV_ZTTBASICOBJI5.

FIELD ZTTT001-ZTTBASICOBJI6 MODULE MZV_ZTTBASICOBJI6.

FIELD ZTTT001-ZTTBASICOBJI7 MODULE MZV_ZTTBASICOBJI7.

FIELD ZTTT001-ZTTBASICOBJI8 MODULE MZV_ZTTBASICOBJI8.

FIELD ZTTT001-ZSEASONALPROD MODULE MZV_ZSEASONALPROD.

FIELD ZTTT001-ZROUTEID MODULE MZV_ZROUTE.

FIELD ZTTT001-ZFPLANTS MODULE MZV_ZPLANTS.

FIELD ZTTT001-ZTOPLANTS MODULE MZV_ZTOPLANTS.

FIELD ZTTT001-ZSTACKCONFIG MODULE MZV_ZSTACKCONFIG.

G_OKCODE2 = SY-UCOMM.

CASE G_OKCODE2.

WHEN 'SAVE'.

" Write code for save as draft version and saving the existing data.

PERFORM SAVE_AS_DRAFT_VERSION.

WHEN 'COMP'.

ZTTT001-ZDOFCOMMENCT = SY-DATUM.

PERFORM SAVE_DATA_ORIGINATOR.

PERFORM F_UPDATENWORKFLOW. " Update the database table and initiate workflow.

LEAVE PROGRAM.

  • WHEN 'ENTER'.

  • PERFORM save_temporary_data.

  • LEAVE TO SCREEN 9020.

WHEN 'OTHERS'.

BREAK-POINT.

PERFORM TT_GENERATE_NUMBER.

Wa_ZTTT001-MATNR = ZTTT001-MATNR.

Wa_ZTTT001-ZTTNO = ZTTT001-ZTTNO.

Wa_ZTTT001-ZORGNAME = ZTTT001-ZORGNAME.

Wa_ZTTT001-ZORGCONT = WA_ITZTTT001-ZORGCONT.

Wa_ZTTT001-ZDECNTNAME = ZTTT001-ZDECNTNAME.

Wa_ZTTT001-ZFACTNAME = ZTTT001-ZFACTNAME.

Wa_ZTTT001-ZTTCREDATS = ZTTT001-ZTTCREDATS.

Wa_ZTTT001-ZTTBASICOBJ1 = ZTTT001-ZTTBASICOBJ1.

Wa_ZTTT001-ZTTBASICOBJ2 = ZTTT001-ZTTBASICOBJ2.

Wa_ZTTT001-ZTTBASICOBJ3 = ZTTT001-ZTTBASICOBJ3.

Wa_ZTTT001-ZTTBASICOBJ4 = ZTTT001-ZTTBASICOBJ4.

Wa_ZTTT001-ZTTBASICOBJ5 = ZTTT001-ZTTBASICOBJ5.

Wa_ZTTT001-ZTTBASICOBJ6 = ZTTT001-ZTTBASICOBJ6.

Wa_ZTTT001-ZTTBASICOBJ7 = ZTTT001-ZTTBASICOBJ7.

Wa_ZTTT001-ZTTBASICOBJ8 = ZTTT001-ZTTBASICOBJ8.

Wa_ZTTT001-ZDOFCOMMENCT = ZTTT001-ZDOFCOMMENCT .

Wa_ZTTT001-ZSEAARSHIPTEXT = ZTTT001-ZSEAARSHIPTEXT.

Wa_ZTTT001-ZPRODHIERARCHY = ZTTT001-ZPRODHIERARCHY.

Wa_ZTTT001-ZNEWPRODDEV = ZTTT001-ZNEWPRODDEV.

Wa_ZTTT001-ZPRODNAME = ZTTT001-ZPRODNAME.

Wa_ZTTT001-ZNOFPALLETS = ZTTT001-ZNOFPALLETS.

Wa_ZTTT001-ZSTACKCONFIG = ZTTT001-ZSTACKCONFIG.

Wa_ZTTT001-ZRATFTT1 = ZTTT001-ZRATFTT1.

Wa_ZTTT001-ZRATFTT2 = ZTTT001-ZRATFTT2.

Wa_ZTTT001-ZCOMMENTS = ZTTT001-ZCOMMENTS.

Wa_ZTTT001-ZROUTEID = ZTTT001-ZROUTEID.

Wa_ZTTT001-ZTOPLANTS = ZTTT001-ZTOPLANTS.

Wa_ZTTT001-ZFPLANTS = ZTTT001-ZFPLANTS.

Wa_ZTTT001-ZSHIPMENTNO = ZTTT001-ZSHIPMENTNO.

Wa_ZTTT001-ZDELIVERY = ZTTT001-ZDELIVERY.

Wa_ZTTT001-ZTRAILER = ZTTT001-ZTRAILER .

Wa_ZTTT001-ZPALLET = ZTTT001-ZPALLET.

Wa_ZTTT001-ZSTONUM = ZTTT001-ZSTONUM.

Wa_ZTTT001-ZSTATORG = 'Complete Version'.

MOVE Wa_ZTTT001 TO ZTTT001.

MODIFY ZTTT001 FROM Wa_ZTTT001.

COMMIT WORK.

endform.

1 REPLY 1

Former Member
0 Kudos
77

Let's see... if you call the subscreen9030 after 9020 PBO, then in the 9020 PAI you call it again, and the PBO for 9030 initializes the data, didn't you just wipe out what you have entered?