‎2007 Jun 01 8:29 AM
HI ,
My doubt is , from selection screen , i need to go to transaction (say ME21N) and then create the PO and saved it.the entered values should be updated in table .
How can I handle it? Is it through BDC or anything else.
Can u provide any sample code
Thanks in advance
Points will be rewarded
‎2007 Jun 01 8:43 AM
hi,
why don't you use
call transaction <Tcode> and skip first screen
Before doing this, you will have to set the parameter IDs of all the mandatory fields of the transaction's first screen.
Save this and you can come back to your selection screen on pressing the back button
‎2007 Jun 01 8:31 AM
You cannot run bdc for me21n. You will have to use BAPI function module for this.
What do you mean by selection screen? You will be importing the value (data) from selection screen?
Try using function module : BAPI_PO_CREATE1
Thanks,
Shweta
‎2007 Jun 01 8:33 AM
Hi,
In the selection-screen , u need to keep a pushbuttom with Function code (say PO)..
U need to record all the screen s using SHDB for tcode ME21.
After that :in the coding:
CAse sy-ucomm.
when 'PO'.
,,,,,,,
,,,,
logic of recording of ME21 tcode.
endcase.
Revert back if any issues,
Reward with points if helpful.
Regards,
Naveen.
Message was edited by:
Naveen Deva
‎2007 Jun 01 8:34 AM
you can do it by calling the Tcode.. but i want to know about your selection screen..
‎2007 Jun 01 8:35 AM
Hi
Write a report such that you go to ME21N straight away after execution.
in start of selection write
call transaction 'ME21N' .
But how many records you create? just a single PO.
If you wants to create multiple PO's write the BDC for ME21 alone (as you can't write BDC for ME21N, as it is enjoy transaction and have to use only a BAPI like BAPI_PO_CREATE) such that
fiirst put the data of PO ina flat fiel/excel sheet
Upload that using GUI_UPLOAD into an internal table.
Then loop that internal table and process the BDC screens in that loop.
Reward points if useful
Regards
Anji
‎2007 Jun 01 8:43 AM
hi,
why don't you use
call transaction <Tcode> and skip first screen
Before doing this, you will have to set the parameter IDs of all the mandatory fields of the transaction's first screen.
Save this and you can come back to your selection screen on pressing the back button