Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10665

Re: how to create pr using bapi through file upload.

$
0
0

Hi GOPI,

data ls_string type string.

data lt_string type table of string.

For getting the file from the Applicaion server.

 

IF lv_INV_path IS NOT INITIAL. " File Path with File name.

 

         OPEN DATASET lv_INV_path FOR INPUT IN TEXT MODE ENCODING DEFAULT.

         if sy-subrc <> 0 .

           exit.

         endif.

         DO.

           READ DATASET lv_INV_path INTO ls_string.

           IF sy-subrc = 0. " Always check the SUBRC value after read statement.

             APPEND ls_string to lt_string.

           ELSE.

             EXIT.

           ENDIF.

         ENDDO.

         CLOSE DATASET LV_INV_PATH . "Always close the Dataset after read or Write the file.

         ENDIF.



Now your data come in the String table.

 

Now loop on the String table and split the column one by one. Sequence must be same as the file sequence.


If any furthur issue let me know.

Regards.

Nishant Bansal










Viewing all articles
Browse latest Browse all 10665

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>