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

GET PARAMETER ID

Former Member
0 Likes
838

Hi everyone,

I have smartforms for 2 transaction: me9k,me9f.

i wrote in my program:

Get parameter id 'BES' field p_ebeln.

if p_ebeln is initial.

Get parameter id 'VRT' field p_ebeln.

endif.

my problem is that if one time we got parameter id from 'BES' and the second time i want to get parameter id from 'VRT'

it remember the first time and doesnt get data from 'VRT'.

is there a way to set free the parameter id - that when i ran my program for the second time - it wont remember the data from the first time?

thanks,

dana.

7 REPLIES 7
Read only

Former Member
0 Likes
797

Hai

Try with this

if p_ebeln <> space.

Get parameter id 'BES' field p_ebeln.

elseif p_ebeln = space.

Get parameter id 'VRT' field p_ebeln.

endif.

Regards

Sreeni

Read only

Former Member
0 Likes
797

Hi,

Why dont you check SY-SUBRC after Get parameter id 'BES' field p_ebeln.

So if some value is retrieved from the starement you can proceed with it else clear the value of p_ebeln.

e.g.

Get parameter id 'BES' field p_ebeln.

if sy-subrc <> 0.

clear p_ebeln.

endif.

In case this does not serve the purpose please do revert back

Regards

Arun

Read only

Former Member
0 Likes
797

Do this:

Get parameter id 'BES' field p_ebeln.

<b>set parameter id 'BES' field space.</b>

if p_ebeln is initial.

Get parameter id 'VRT' field p_ebeln.

endif.

Regards,

Ravi

Read only

0 Likes
797

my problem is not with the p_ebeln,

my problem is that if i need to get the data:

get parameter id 'VRT' field p_ebeln.

he doesnt even get there because he stock with the 'bes' because it remember the last time.

is there a way to get free from memory the parameter id 'BES' and 'VRT'

when i finish ranning my program?

thanks,

dana.

Read only

0 Likes
797

Hi ,

If that is what you want then at end of your program , you need to use the SET PARAMETER command to assign blank or space as values to these memory ids.

Regards

Arun

Read only

0 Likes
797

i have a strange result:

when i ran the program first time - everything ok.

when i ran the second time with the same order -he give me parameter id blanck.

is anyone know how to help me?

thank you.

dana.

Read only

0 Likes
797

Hi,

It is becuse we are setting the value as blank at the end of the program .

there is a concept called Static variables , it is basically a local varaible which retails the value when it was called last time , but please do rem this is applicable if it is in the same context.

Try using it

Regards

aRUN

Message was edited by:

Arun R