‎2009 Mar 02 3:03 AM
hi experts,
id like to ask on how these codes work,
FORM entry USING return_code us_screen.
CLEAR retcode.
xscreen = us_screen.
PERFORM processing USING us_screen.
CASE retcode.
WHEN 0.
return_code = 0.
WHEN 3.
return_code = 3.
WHEN OTHERS.
return_code = 1.
ENDCASE.
ENDFORM. "entry
im having hard time to understand it, since its my first time encountering this codes.
also when i check the syntax an error prompt, that retcode is unknown,
do i have to declare it in data section?
thanks in advance.
‎2009 Mar 02 3:19 AM
Hi,
That is a part of your print program...form ENTRY is commonly the 1st group of codes that was executed when your output type is used. You can view the settings of your output type in tcode NACE.
if retcode was not declared and if that program is a Z program, yes you must declare it.
Regards,
Leonard Chomi
‎2009 Mar 02 3:19 AM
Hi,
That is a part of your print program...form ENTRY is commonly the 1st group of codes that was executed when your output type is used. You can view the settings of your output type in tcode NACE.
if retcode was not declared and if that program is a Z program, yes you must declare it.
Regards,
Leonard Chomi
‎2009 Mar 02 3:28 AM
‎2009 Mar 02 4:16 AM
‎2009 Mar 02 3:23 AM
hey buddy, just analyse how the code is run..
FORM entry USING return_code us_screen.
CLEAR retcode.
xscreen = us_screen.
PERFORM processing USING us_screen.
CASE retcode.
WHEN 0.
return_code = 0.
WHEN 3.
return_code = 3.
WHEN OTHERS.
return_code = 1.
ENDCASE.
ENDFORM. "entry
there is a form which uses the parameter value 'return_code us_screen'.
so whenever this perform is executed, the form 'ENTRY' is called the values in return_code and us_screen are passes to it.... then therz another form being called within this 'entry' form which passes the value of us_screen to it.. back in the 'ENTRY' form, you have the case statement.
The 'RETCODE' is either a global variable or it has not been declared. But since you get an error, it has NOT been declared. Check out ur 'USING' and 'CHANGIN' in form...
‎2009 Mar 02 5:29 AM
Hi,
The variables must have been defined in another include of the main program.
Try activating your codes first since if the declaration is in another include , it will give you an error but the code will be activated correctly.
Regards.