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

Re: Set parameter id

Former Member
0 Likes
1,005

Hiii All,

I have a parameter statement in report

in that i want to give a table name,

when i execute the report -


i want to reflect the table name which i have given in the parameter

should reflect the ddic table.

regards,

Sashi

1 ACCEPTED SOLUTION
Read only

sarbajitm
Contributor
0 Likes
874

Tables:dd03l.

Parameter : P_tabnm type dd03l-tabname.

data: G_tabnm type dd03l-tabname.

At selection-screen.

select tabname into G_tabnm from dd03l

where tabname = P_tabnm.

endselect.

if sy-subrc ne 0 .

MESSAGE 'No such table' TYPE 'E'.

endif.

END-OF-SELECTION.

write:/ P_tabnm.

Edited by: Sarbajit Majumdar on Mar 20, 2009 4:31 PM

Edited by: Sarbajit Majumdar on Mar 20, 2009 4:33 PM

5 REPLIES 5
Read only

sarbajitm
Contributor
0 Likes
875

Tables:dd03l.

Parameter : P_tabnm type dd03l-tabname.

data: G_tabnm type dd03l-tabname.

At selection-screen.

select tabname into G_tabnm from dd03l

where tabname = P_tabnm.

endselect.

if sy-subrc ne 0 .

MESSAGE 'No such table' TYPE 'E'.

endif.

END-OF-SELECTION.

write:/ P_tabnm.

Edited by: Sarbajit Majumdar on Mar 20, 2009 4:31 PM

Edited by: Sarbajit Majumdar on Mar 20, 2009 4:33 PM

Read only

Former Member
0 Likes
874

Hi,

use like

SET PARAMETER ID '<table name>' FIELD fvalue.

CALL TRANSACTION 'SE11' and skip first screen.

Regards,

jaya

Read only

tarangini_katta
Active Contributor
0 Likes
874

Hi,

data : fnam TYPE TABNAME16,

fval(10) type c.

parameters : tabname(10) type c.

FNAM = 'TBMA_VAL'.

FVAL = TABNAME.

get cursor field fnam value fval.

FVAL = TABNAME.

set parameter id 'DTB' field fval.

call transaction 'SE11'.

Thanks

Read only

Former Member
0 Likes
874

Hi Sashi,

I think this is the piece of code you require..

Execute and check it yourself.

REPORT ZRAJTEST
       NO STANDARD PAGE HEADING LINE-SIZE 255.
DATA: IT_BDCDATA TYPE BDCDATA OCCURS 0 WITH HEADER LINE,
      MODE TYPE CTU_MODE.
PARAMETERS: TABNAME TYPE DD03L-TABNAME.

CLEAR IT_BDCDATA.
IT_BDCDATA-PROGRAM  = 'SAPMSRD0'.
IT_BDCDATA-DYNPRO   = '0102'.
IT_BDCDATA-DYNBEGIN = 'X'.
APPEND IT_BDCDATA.
CLEAR IT_BDCDATA.
IT_BDCDATA-FNAM = 'BDC_OKCODE'.
IT_BDCDATA-FVAL = '=SHOW'.
APPEND IT_BDCDATA.
 
SET PARAMETER ID 'DTB' FIELD TABNAME. "Had mentioned 'BES' earlier which was wrong
CALL TRANSACTION 'SE11' USING IT_BDCDATA MODE 'E'.

Get back to me if you require any clarification.

Regards,

Rajan.

A slight change in the parameter ID. Please Check it. There was a slight mistake.

Edited by: rajan roy on Mar 20, 2009 1:31 PM

Read only

Former Member
0 Likes
874

Hi Sashi,

With reference to my earlier post, I had wrongly mentioned the Parameter ID. Please change it to 'DTB' and execute. Do get back to me if you are facing any problems.

Regards,

Rajan.