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

Subroutine

Former Member
0 Likes
750

can any one give me explaination of this:

FORM output_cfg_label.

CHECK p_cfg = 'X'.

SUBMIT zmr_cfg_tags

WITH p_ldest = p_dest2

WITH p_test = p_test

WITH s_charg = itab_batches_line-charg

WITH s_posnr = itab_batches_line-posnr

WITH s_vbeln = itab_batches_line-vbeln

AND RETURN.

ENDFORM.

5 REPLIES 5
Read only

Former Member
0 Likes
732

first he is checking the condition whether the value of the field p_cfg is x.

if its x.

he is passing the input parameters p_ldest ,p_test,s_charg , s_posnr,s_vbeln to the program zmr_cfg_tags,which inturn gives the result after executing.

concept is he is calling an executable program with in the subroutine by providing the select-options as the input.

Reward if useful.

Read only

Former Member
0 Likes
732

hi,

First he is checkng the condition p_cfg if 'X'.

if checked he is calling an executable program by passing the parameters in the select-options which in turns executes and gives the output in return.

reward if helpful

Read only

Former Member
0 Likes
732

Hi,

first it is Checking The Value of Configuration parameter .

If it is Checked(Value X) Then it is submitting the program zmr_cfg_tags

with values from Selection screen

regards

Sandipan

Read only

Former Member
0 Likes
732

Hi,

FORM output_cfg_label.

CHECK p_cfg = 'X'.

SUBMIT zmr_cfg_tags

WITH p_ldest = p_dest2

WITH p_test = p_test

WITH s_charg = itab_batches_line-charg

WITH s_posnr = itab_batches_line-posnr

WITH s_vbeln = itab_batches_line-vbeln

AND RETURN.

ENDFORM.

In the above subroutine you are using check statement to check the value of p_cfg.you can change the above code as

FORM output_cfg_label.

If p_cfg = 'X'.

SUBMIT zmr_cfg_tags

WITH p_ldest = p_dest2

WITH p_test = p_test

WITH s_charg = itab_batches_line-charg

WITH s_posnr = itab_batches_line-posnr

WITH s_vbeln = itab_batches_line-vbeln

AND RETURN.

endif.

ENDFORM.

the difference between if statement and check statement is

if if statement fails then the code after endif is executed.in your case the code after subroutine is executed.if check statement fails the execution stops completely.

Read only

Former Member
0 Likes
732

Hi,

Based on some conditions making the p_cfg = 'X'.If condtions not satisfies p_cfg = ''.

In your code.

If p_cfg = 'X'. run the program "zmr_cfg_tags" in back ground.

else. com out of the perform.