Application Development 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: 

Re: Set parameter id

Former Member
0 Kudos

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

sarbajitm
Contributor
0 Kudos

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

sarbajitm
Contributor
0 Kudos

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

Former Member
0 Kudos

Hi,

use like

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

CALL TRANSACTION 'SE11' and skip first screen.

Regards,

jaya

tarangini_katta
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.