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

GET PARAMETER ID?

Former Member
0 Likes
1,633

Hi Experts,

I hv written the code like,

DATA mblnr_123 like mkpf-mblnr.

GET PARAMETER ID MBN FIELD mblnr_123

(I did not used the SET PARAMETER ID MBN, Is this the reason behing error throwinh?)

Error: ''The MBN is unknown. Neither in tables nor defined with DATA statemnst''

(I did not used the SET PARAMETER ID MBN, Is this the reason behing error throwinh?)

So,

What I hv to do to fix it?

ThanQ

1 ACCEPTED SOLUTION
Read only

suresh_datti
Active Contributor
0 Likes
1,254

You have to give the pid in quotes.. ie

GET PARAMETER ID 'MBN' FIELD mblnr_123.

& yes, you will have to SET it, but the error you got is a syntax error.

~Suresh

7 REPLIES 7
Read only

Former Member
0 Likes
1,254

Hi Sridhar,

If you need to get rid of the errr, you would need to create MBN in table TPARA me thinks.

Regards,

Aditya

p.s. thru table maintenance SM30 for the table

Message was edited by:

Aditya Laud

Read only

suresh_datti
Active Contributor
0 Likes
1,255

You have to give the pid in quotes.. ie

GET PARAMETER ID 'MBN' FIELD mblnr_123.

& yes, you will have to SET it, but the error you got is a syntax error.

~Suresh

Read only

0 Likes
1,254

ThanQ Suresh,

I hv code like,

CALL TRANSACTION 'MB1B' USING BDCDATA MODE 'N' UPDATE 'S'.

Here the mat. doc. is creating, so i wanna to catch the created MBLNR in to my field mblnr_123.

So, Where I hv to write,

SET PARAMETER ID 'MBN' FIELD mblnr_123?

ThaNQ.

Read only

0 Likes
1,254

the syntax is correct but the field mblnr_123 should have the MBLNR value. Does it? I don't think the statement CALL TRANSACTION 'MB1B' USING BDCDATA MODE 'N' UPDATE 'S' will put it in the variable.

~Suresh

Field name changed to MBLNR

Read only

0 Likes
1,254

I am working on this prog. i.e. not yet executed to know, weather the MATNR(actually, not MATNR, here its Materail Document #) is storing into mblnr_123 with CALL TSTC? or not (u asked me9

Will let u know, after executing.

ThaQ.

Read only

0 Likes
1,254

Hi,

User the syntax like this.

 DATA: CTUMODE LIKE CTU_PARAMS-DISMODE VALUE 'N'.
  "A: show all dynpros
  "E: show dynpro on error only
  "N: do not display dynpro

  DATA: CUPDATE LIKE CTU_PARAMS-UPDMODE VALUE 'S'.
  "S: synchronously
  "A: asynchronously
  "L: local

  DATA:   bdcdata   LIKE bdcdata    OCCURS 0    WITH HEADER LINE,
          messtab   LIKE bdcmsgcoll OCCURS 0    WITH HEADER LINE.

  REFRESH MESSTAB.

  CALL TRANSACTION TCODE USING BDCDATA
                   MODE   CTUMODE
                   UPDATE CUPDATE
                   MESSAGES INTO MESSTAB.

When you use MESSTAB, any messages that occur during CALL TRANSACTIONUSING ... are collected in this internal table.

When you create a material document ( or any other document using any transaction ) using transaction MB1B, the very last message you get is something like "Document XXXXXXXX is created". Here XXXXXXXX is material document number. When you use CALL TRANSACTION with MESSTAB, the message with material document number will be appneded to this table.

What you need to do is, create a material document using transaction MB1B in online mode. When the document is created and you get the message "Document XXXXXXX is created", double-click the message and note down the message-id and message number. ( we do not use material docuemnt, other i would given you the message-id and number. The message-id might be M7 but i am not sure ).

Now program returns after CALL TRANSACTION..., once you determine that the call transaction was successful, loop at message table. Loop at lessage table for the message-id(MSGID) and message no(MSGNR). One of the variable (MSGV1/2/3/4) should hold this material doc #.

Now take this material doc #, move it to field mblnr_123 and write

<b>SET PARAMETER ID 'MBN' FIELD mblnr_123</b>

Let me know if you have any question.

Regards,

RS

Read only

Former Member
0 Likes
1,254

Hi sridhar,

Doesn't matter whether you use set parameter. but you need to write parameter id in single quotes. like below mentioned

GET PARAMETER ID 'MBN' FIELD mblnr_123.

reward helpful answers

regards,

venkat