04-20-2007 1:55 PM
Hi Experts,
A - section of my_bdc_prog wuld create a material doc. with mvmnt type 123.
Immediately next moment,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
B- section of my_bdc_prog wuld create a material doc. with mvmnt type 124.
So, to capture MBLNR value of 123 Mvmnt type,
1) Can I use directly (with out using/writing explicitly SET PARAMETER ID MBN FILED store_my_mblnr_123 i.e. I mean, Is it that, automatically-default, the SAP stores the just created MBLNR in its MBN parameter ID ) as,
GET PARAMETER ID MBN FIELD MY_MBLNR_OF_123_FOR_USE_IN_124,
in the place above, where I noted as 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
Then, i wanna use this MY_MBLNR_OF_123_FOR_USE_IN_124 for further program code!
Is it works out?
ThanQ.
04-20-2007 2:04 PM
Hi Sridhar,
If you use call transaction method, then yo ucan just collect the freshly created mblnr using the messages table
call transaction '<tcode'> using bdcdata messages into it_bdcmsgcoll..
loop at it_bdcmsgcoll where msgtyp = 'S'.
Catch the mblnr in msgv1.
endloop.
Regards,
ravi
04-20-2007 2:02 PM
Are you doing Call Transaction. Can you not get the messages back from the call transaction.
04-20-2007 2:06 PM
Yes, I am doing Call Transaction and getting the messages into bdc_msg_coll itab.
So, Do u mean that, I can retrive the MBLNR from above mentioned itab?
(but, I am enhancing already written code. So, just I wanna use GET PARA ID!)
ThanQ.
04-20-2007 2:04 PM
Hi Sridhar,
If you use call transaction method, then yo ucan just collect the freshly created mblnr using the messages table
call transaction '<tcode'> using bdcdata messages into it_bdcmsgcoll..
loop at it_bdcmsgcoll where msgtyp = 'S'.
Catch the mblnr in msgv1.
endloop.
Regards,
ravi
04-20-2007 2:09 PM
ThanQ Ravi,
So, Do u mean that, Using PARA ID is not a good idea? or any other constriants?
ThanQ.
04-20-2007 2:15 PM
Nothing wrong, but i haven't tried that way.
One more thing is that the parameter id using get parameter id will get the last set value for that parameter . In between your section A and Section B, if suppose somebody else, sets that parameter id in some other program(ALthough the probability is very low).., then your logic will go wrong, since you pick the wrong value.
Regards,
ravi
04-20-2007 2:42 PM
ThanQ Ravi,
OK, will try both ways, and implement 1 after once again thinking off ur latest remark!
ThanQ.
04-20-2007 2:50 PM
Sridhar,
otherwise, you can maintain the parameter id in your user profile and get the value directly without writing any code...
Think of this option... if it helps...
Regards,
Sankar.
04-20-2007 3:32 PM
ThanQ Sankar,
Sorry to ask this simple doubt that,
U asking me (ABAPer) to add PARA ID in my user profile, OK, fine. But,
1- Do u mean that, here the User is End user, who works with this code/transaction (in the production) in the accounts departent?
2- If so, How can I add PARA ID in the clerks user profile?
3- And, anyways, How to add PARA ID into my User profile?
4- U said that, get the value directly, So, pls. let me know that How to get it?(Then Wat code I hv to write to SET PARA and GET PARA?)
ThanQ.
Message was edited by:
Sridhar
Message was edited by:
Sridhar