cancel
Showing results for 
Search instead for 
Did you mean: 

I want to upload files in sap-directories using webdynpro abap.

Former Member
0 Kudos

My requirement is i need to read the filess from the local system in a folder and save those files in the sap directories(AL11).Need help .

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Aisurya
Participant
0 Kudos

Hi Dear,

U have to use File upload UI element , then read the file then follow the code for transfering into SAP directories:

check this


*Declare T_UPLOAD , W_UPLOAD  itab  and  wa with your file heading structure
*
DATA:L_LINE TYPE STRING.

  P_FLNAME = 'Test123'. " file name 

 OPEN DATASET P_FLNAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
 CHECK SY-SUBRC = 0.

 LOOP AT T_UPLOAD INTO W_UPLOAD.
  CONCATENATE W_UPLOAD-Field1
              W_UPLOAD-Field2
              W_UPLOAD-Field3
              W_UPLOAD-Field4
              W_UPLOAD-Field5
              INTO L_LINE
              SEPARATED BY ','.
 TRANSFER L_LINE TO P_FLNAME.
 ENDLOOP.

CLOSE DATASET P_FLNAME.

I think it may help u a lot..

Regards

Aisurya

former_member199125
Active Contributor
0 Kudos

Hi..

you can upload the files from local system into webdynpro using upload UI element..

For upload ui element refer below links

http://help.sap.com/saphelp_nw04s/helpdata/en/b3/be7941601b1d09e10000000a155106/content.htm

and am not sure abt AL 11, once we get the data in webdynpro, you can transfer the data to al11( this directory part i dont know how to transfer data to directories )

Regards

Srinivas