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

Re: ABAP : Add Line items based on same material in .CSV File

$
0
0

Hi,

 

Please test this code on your machine .

 

Look at the content of it_sbook_d and it_sbook_t.

 

FORM test_6_1 .

 

  TYPES: BEGIN OF tp_sbook_t .

  TYPES: carrid      TYPE sbook-carrid ,

         connid      TYPE sbook-connid ,

         fldate      TYPE sbook-fldate .

 

  TYPES: loccuram    TYPE sbook-loccuram ,

         loccurkey   TYPE sbook-loccurkey .

 

  TYPES: END OF tp_sbook_t .

 

  DATA: it_sbook_d TYPE TABLE OF sbook .

 

  DATA: it_sbook_t TYPE TABLE OF tp_sbook_t .

  DATA: st_sbook_t LIKE LINE OF it_sbook_t.

 

  SELECT * INTO TABLE it_sbook_d

  FROM sbook

  UP TO 1000 ROWS  .

 

  FIELD-SYMBOLS: <st_sbook_d> LIKE LINE OF it_sbook_d .

 

  LOOP AT it_sbook_d ASSIGNING <st_sbook_d> .

 

    MOVE-CORRESPONDING <st_sbook_d> TO st_sbook_t  .

 

    COLLECT st_sbook_t INTO it_sbook_t .

 

  ENDLOOP.

 

BREAK-POINT .

 

ENDFORM .                                                   "test_6_1

*----------------------------------------------------------------------*

 

 

Regards.


Viewing all articles
Browse latest Browse all 10671

Trending Articles



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