‎2007 Apr 20 6:34 PM
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
‎2007 Apr 20 6:37 PM
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
‎2007 Apr 20 6:36 PM
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
‎2007 Apr 20 6:37 PM
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
‎2007 Apr 20 6:43 PM
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.
‎2007 Apr 20 6:47 PM
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
‎2007 Apr 20 7:06 PM
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.
‎2007 Apr 20 8:22 PM
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
‎2007 Apr 20 7:47 PM
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