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: 

BAPI_PO_CREATE1

Former Member
0 Kudos

Hi Gurus,

I am working on Puechase order creation and for this I am using the BAPI_PO_CREATE1, in my case the iput file can come either from the server or from the PC, So basically I need to ask the user to tell from where the file is coming, and for this I need to use radio button and if user select that file will be coming from the system then the user also need to give the location and same applies in the case of file coming from the application server.

As of now I have written the following code:

selection-screen begin of block b1 with frame title text-001.

parameters: p_ifname like rlgrap-filename obligatory.

selection-screen end of block b1.

selection-screen begin of block b2 with frame title text-002.

parameters: p_ifnam2 like rlgrap-filename obligatory DEFAULT '/tmp'.

selection-screen end of block b2.

selection-screen begin of block b3 with frame title text-003.

parameters: p_upld radiobutton group upld default 'X',

p_upldex radiobutton group upld.

selection-screen end of block b3.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_ifname.

CALL FUNCTION 'F4_FILENAME' "allows user to select path/file

EXPORTING

program_name = 'Z_PO'

dynpro_number = syst-dynnr

field_name = 'p_ifname'

IMPORTING

file_name = p_ifname.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_ifnam2.

ld_file = p_ifnam2.

but this is not fullfilling my requirement.

Can you please tell me how to take care of this.

Thanks

Rajeev Gupta

5 REPLIES 5

Former Member
0 Kudos

Please give me reward point If it is useful

Thanks

Murali Poli

0 Kudos

Thanks for the reply but this is not what I was asking.

Former Member
0 Kudos

Hi Rajeev,

I am not having a SAP right now. You can debug transaction CG3Y and CG3Z that is used to upload the file on the application server from PC and vice versa.

Thanks

Mohit

Former Member
0 Kudos

hi rajeev,

i have abserved ur code. Instead of validating from paths i.e. p_ifname ir p_ifname2. just validated from the radiobutton. Based on radiobutton user selects you have to make use of corresponding parameter value i.e. p_ifname or p_ifname2.

then go ahead with normal coding....

Dont forget to reward points if its useful.

Regards

Sreenivas

0 Kudos

Hi Srinivas,

First of all thanks for the reply, actually I am new to ABAP can you please explain me in detail.

Thanks

Rajeev Gupta