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

Parameter ID in Data Element

Former Member
0 Likes
3,247

Hi All,

I wrote the code like this.


********Report1***************

REPORT ZTEST_DO_DE_1.

Data: lname type zchar12_de.

lname = 'Seshu'.

submit ztest_do_de_2.


***************Report2************************

REPORT ZTEST_DO_DE_2.

PARAMETERS: myName type zchar12_de.

write:/ myName.



In this example, zchar12_de is a data element and has parameter id 'ZTEST' in further characteristics tab. So when Report2 was called, it should display the name 'Seshu' in selection screen, but not. Can you please tell me why?

Regards,
Seshu

9 REPLIES 9
Read only

FredericGirod
Active Contributor
0 Likes
2,342

Hi,

have a look to the abap statement :  SET PARAMETER ID  /   GET PARAMETER ID

regards

Fred

Read only

0 Likes
2,342

Hi Frédéric,

Yes. we can achieve it through SET PARAMETER ID / GET PARAMETER ID. But I want to know the use of Parameter ID option in Data Element. Thank You for reply.

Regards,
Seshu

Read only

0 Likes
2,342

And ?  did you expect SAP will do it without this statement ?

It's not because a data element is link with a parameter ID, than that will work. For example, WERKS_D is link with the parameter ID WRK. But if you forget to specify the GET, it will not work (it appends a lot of time in standard program).

but maybe you would like to speak about the additionnal parameters : MEMORY ID ??

regards

Fred

Read only

0 Likes
2,342

When you create a screen dynpro, and add such a field, if you set the Dictionary Attributes box, the parameter id will be adopted by the dynpro, so you will get implicit GET/SET PARAMETER ID executed in PBO and PAI. (Filling an Initial Screen Using SPA/GPA Parameters )

Regards,

Raymond

Read only

0 Likes
2,341

Hi,

you can look this image:

let me know,

AI

Read only

0 Likes
2,341

Set parameter ID, saves the value, Get paramter ID retrieves, in case of having a data element, it saves you from 'Get parameter id' statement, but you still need to SET, hope it clarifies

Read only

Former Member
0 Likes
2,341

hi,

the correct method is SET/GET PARAMETER.

Example is as follows:

REPORT  ZTEST_DO_DE_1.

Data: lname type ZCHAR12_DE.
lname = 'Seshus'.
SET PARAMETER ID 'myName' FIELD lname.
submit ztest_do_de_2.

EPORT  ZTEST_DO_DE_2.

PARAMETERS: myName type ZCHAR12_DE.

GET PARAMETER ID 'myName' FIELD myName.
write:/ myName.

Read only

0 Likes
2,341

Hi abdul,

This code works even if we don't specify the parameter ID in data element. Then what is the use of specifying Parameter ID in data element??

Thanks & Regards,
Seshu

Read only

0 Likes
2,341

Since you've specified parameter ID in data element, you wont need to use Get parameter to retrieve & repopulate.