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: 

GET PARA ID with out coding SET PARA ID?

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

former_member181962
Active Contributor
0 Kudos

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

8 REPLIES 8

Former Member
0 Kudos

Are you doing Call Transaction. Can you not get the messages back from the call transaction.

0 Kudos

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.

former_member181962
Active Contributor
0 Kudos

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

0 Kudos

ThanQ Ravi,

So, Do u mean that, Using PARA ID is not a good idea? or any other constriants?

ThanQ.

0 Kudos

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

0 Kudos

ThanQ Ravi,

OK, will try both ways, and implement 1 after once again thinking off ur latest remark!

ThanQ.

0 Kudos

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.

0 Kudos

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