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

SET/GET Parameters in background

Former Member
0 Likes
2,471

Hello everyone,

I have a Z program in which i do a SET PARAMETER ID to field 'ZPG' i created. Then i do a call transaction that runs F110. In one of the BTE's the transaction has, i try to GET PARAMETER ID of that same field 'ZPG', but i'm not receiving anything. I know for a fact that this BTE is run in background. I tried doing the GET PARAMETER in another program, but in on-line mode, and everything works fine.

Does this means that when in background processing i can't do a GET PARAMETER that was SET before in an on-line z program ?

If not, how can i do a workaround to this problem ?

Thank you all,

Santi

Hello everyone,

I have a Z program in which i do a SET PARAMETER ID to field 'ZPG' i created. Then i do a call transaction that runs F110. In one of the BTE's the transaction has, i try to GET PARAMETER ID of that same field 'ZPG', but i'm not receiving anything. I know for a fact that this BTE is run in background. I tried doing the GET PARAMETER in another program, but in on-line mode, and everything works fine.

Does this means that when in background processing i can't do a GET PARAMETER that was SET before in an on-line z program ?

If not, how can i do a workaround to this problem ?

Thank you all,

Santi

8 REPLIES 8
Read only

hadiman_ngoei
Product and Topic Expert
Product and Topic Expert
0 Likes
1,558

Try to enter the parameter id 'ZPG' in your user master record (t-code: SU3 -> Parameters) and try to run F110 again and break point at your BTE Function module. If it works, then check out again your Z program.

By the way, BTE concept is like Customer Exit, and it is processed within the same work process(wp), not on a separate wp.

Thanks & regards,

Hadiman

Read only

0 Likes
1,558

Thank you for your reply, Hadiman. I tried to change su3 as you said, but still when i import the parameter i don't get nothing, and in a simple on-line z program i can see the value imported with no problem.

Read only

0 Likes
1,558

Hi,

You can try EXPORT option with DATABASE.

F1 on Export statement

like

DATA :
     wa_inv_no      TYPE char10 VALUE '12345678',
     wa_indx        TYPE indx,
     it_inv_no      TYPE table of char10.

wa_indx-aedat = sy-datum.
wa_indx-usera = sy-uname.
wa_indx-pgmid = sy-repid.

append wa_inv_no  to it_inv_no.
append wa_inv_no  to it_inv_no.
append wa_inv_no  to it_inv_no.

EXPORT inv_no = it_inv_no TO DATABASE indx(xy)
       FROM wa_indx
       CLIENT '200'
       ID 'TABLE'.

DATA :
     wa_inv_no      TYPE char10,
     wa_indx        TYPE indx,
     it_inv_no      TYPE TABLE OF char10.

IMPORT inv_no = it_inv_no FROM DATABASE indx(xy)
       TO wa_indx
       CLIENT '200'
       ID 'TABLE'.

LOOP AT it_inv_no INTO wa_inv_no.

  WRITE wa_inv_no.

ENDLOOP.

Read only

Former Member
0 Likes
1,558

You can use

EXPORT <variable_name> TO DATABASE indx(st) ID con_td1.

IMPORT <variable_name> FROM DATABASE indx(st) ID con_td1.

Regards,

Nikita

Read only

vijy_mukunthan
Active Contributor
0 Likes
1,558

Hi Santi

In online programs i think SET/GET wont work since they are instance dependent. they cannot be available on some place. Dont use EXPORT/IMPORT since its obslete. If your working in workflow better use some custom table to store the values.

Regards

vijay

Read only

0 Likes
1,558

I will try custom tables. Thank you all for your answers.

Read only

0 Likes
1,558

as above experts mentioned

EXPORT <variable_name> TO DATABASE indx(st) ID con_td1.

IMPORT <variable_name> FROM DATABASE indx(st) ID con_td1.

is better idea over using a custom table

thanq

Read only

Former Member
0 Likes
1,558

Hi,

Get and set parameter command does not work in background. Instead, you can use the select query to get the the PID value from the user profile.

e.g. select single parva from usr05 into lv_werks where bname = sy-uname and parid = 'WRK'.

Thanks and regards,

Nilesh.