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

Doubt in Selection screen

Former Member
0 Likes
575

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
552

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

5 REPLIES 5
Read only

Former Member
0 Likes
552

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

Read only

Former Member
0 Likes
552

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

Read only

Former Member
0 Likes
552

you can do it by calling the Tcode.. but i want to know about your selection screen..

Read only

Former Member
0 Likes
552

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

Read only

Former Member
0 Likes
553

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