Application Development and Automation 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: 
Read only

form entry using return_code us_screenj

Former Member
0 Likes
2,812

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,463

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

5 REPLIES 5
Read only

Former Member
0 Likes
1,464

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

Read only

0 Likes
1,463

to where should i type this? thanks

Read only

0 Likes
1,463

you have to write this in your print program.

Regards,

Sravan

Read only

madan_ullasa
Contributor
0 Likes
1,463

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...

Read only

dev_parbutteea
Active Contributor
0 Likes
1,463

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.