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

dhananjay_khamkar
Participant
0 Likes
964

Hi All,

I don't know why following code is not working.

Its calling only transaction but not take value of

mat doc.

Please help me.

REPORT ZDK_PARAMETER line-size 80 .

DATA BEGIN OF ITAB OCCURS 0.

INCLUDE STRUCTURE J_1IEXDYNPRO.

DATA END OF ITAB.

DATA: MAT_DOC TYPE J_1IEXDYNPRO-MAT_DOC value '5000002020',

MAT_DOC_YEAR TYPE J_1IEXDYNPRO-MAT_DOC_YEAR value '2005'.

ITAB-ACTION = 'A01'.

ITAB-REFDOC = 'R05'.

ITAB-MAT_DOC = MAT_DOC.

ITAB-MAT_DOC_YEAR = MAT_DOC_YEAR.

APPEND ITAB.

IF MAT_DOC IS INITIAL.

EXIT.

ELSE.

SET PARAMETER ID 'MBN' FIELD ITAB-MAT_DOC.

SET PARAMETER ID 'MJA' FIELD ITAB-MAT_DOC_YEAR.

CALL TRANSACTION 'J1IEX_C'.

ENDIF.

Thanks in advance,

Dhanu.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
929

Hi Dhananjay,

1. It seems parameter id doesn not work.

2. There is a work around using (BDC intenal table)

3. try this (just copy paste)

REPORT zdk_parameter LINE-SIZE 80 .

DATA BEGIN OF itab OCCURS 0.

INCLUDE STRUCTURE j_1iexdynpro.

DATA END OF itab.

*----


CODE

DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.

*----


CODE

DATA: mat_doc TYPE j_1iexdynpro-mat_doc VALUE '5000002020',

mat_doc_year TYPE j_1iexdynpro-mat_doc_year VALUE '2005'.

itab-action = 'A01'.

itab-refdoc = 'R05'.

itab-mat_doc = mat_doc.

itab-mat_doc_year = mat_doc_year.

APPEND itab.

*----


CODE

bdcdata-program = 'SAPLJ1IEX'.

bdcdata-dynpro = '0001'.

bdcdata-dynbegin = 'X'.

bdcdata-fnam = 'J_1IEXDYNPRO-PO_NUMBER'.

bdcdata-fval = itab-mat_doc.

APPEND bdcdata.

*----


CODE

IF mat_doc IS INITIAL.

EXIT.

ELSE.

SET PARAMETER ID 'MBN' FIELD itab-mat_doc.

SET PARAMETER ID 'MJA' FIELD itab-mat_doc_year.

CALL TRANSACTION 'J1IEX_C' USING bdcdata. "-- code

ENDIF

.

regards,

amit m.

8 REPLIES 8
Read only

Former Member
0 Likes
929

Hi,

HIDE ITAB-MAT_DOC.<<<<<----


HIDE ITAB-MAT_DOC_YEAR.<<<<<----


******here your code*******

IF MAT_DOC IS INITIAL.

EXIT.

ELSE.

SET PARAMETER ID 'MBN' FIELD ITAB-MAT_DOC.

SET PARAMETER ID 'MJA' FIELD ITAB-MAT_DOC_YEAR.

CALL TRANSACTION 'J1IEX_C'.

ENDIF.

****************************

check with this.

Thanks.

If this helps you reward with points.

Read only

hymavathi_oruganti
Active Contributor
0 Likes
929

hi,

use GET PARAMETER ID.

not set

Read only

hymavathi_oruganti
Active Contributor
0 Likes
929

hi,

just check in table J_1IEXDYNPRO , for fields

MAT_DOC , MAT_DOC_YEAR in their data element, the parameter id u have given MBA nad MJA respectively or not.

then

write GET PARAMETER ID

Read only

0 Likes
929

Thanks for responce,

I have tried all of above ways.

but nothing is working.

Please try at your end .

Thanks,

Dhanu.

Read only

0 Likes
929

Thanks all ...

But Amit mittal has given me the best answer and it is woking fine.

Thanks.

Dhanu.

Read only

Former Member
0 Likes
930

Hi Dhananjay,

1. It seems parameter id doesn not work.

2. There is a work around using (BDC intenal table)

3. try this (just copy paste)

REPORT zdk_parameter LINE-SIZE 80 .

DATA BEGIN OF itab OCCURS 0.

INCLUDE STRUCTURE j_1iexdynpro.

DATA END OF itab.

*----


CODE

DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.

*----


CODE

DATA: mat_doc TYPE j_1iexdynpro-mat_doc VALUE '5000002020',

mat_doc_year TYPE j_1iexdynpro-mat_doc_year VALUE '2005'.

itab-action = 'A01'.

itab-refdoc = 'R05'.

itab-mat_doc = mat_doc.

itab-mat_doc_year = mat_doc_year.

APPEND itab.

*----


CODE

bdcdata-program = 'SAPLJ1IEX'.

bdcdata-dynpro = '0001'.

bdcdata-dynbegin = 'X'.

bdcdata-fnam = 'J_1IEXDYNPRO-PO_NUMBER'.

bdcdata-fval = itab-mat_doc.

APPEND bdcdata.

*----


CODE

IF mat_doc IS INITIAL.

EXIT.

ELSE.

SET PARAMETER ID 'MBN' FIELD itab-mat_doc.

SET PARAMETER ID 'MJA' FIELD itab-mat_doc_year.

CALL TRANSACTION 'J1IEX_C' USING bdcdata. "-- code

ENDIF

.

regards,

amit m.

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
929

Hi,

Just check whether the Parameter id you mentioned for the screen fields is correct by pressing F1 for those fields and then go to Technical information.

In debugging the program,check ITAB-MAT_DOC and ITAB-MAT_DOC_YEAR are with values before calling the transaction.

Kindly reward points by clicking the star on the left of reply,if it helps.

Read only

Former Member
0 Likes
929

Hi

I'm using 4.7 and tried to run your transaction but I can't see the parameters you're setting. I have only purchase number and item number.

Max