Problem in GUI_Upload only first field is appending into table

Hi all,
  I m using code :-
DATA : BEGIN OF RAWDATA OCCURS 0,
        RECORD type string,
       END OF RAWDATA.
  CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = g_file
        FILETYPE                      = 'DAT'
        HAS_FIELD_SEPARATOR           = 'X'
      TABLES
        DATA_TAB                      = RAWDATA
     EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
structure of g_file is like ---
TEST1     MAT1     2     EA     15.00     1
TEST2     MAT2     2     EA     20.00     1
TEST3     MAT1     2     EA     15.00     1
TEST4     MAT2     2     EA     25.00     1
TEST5     MAT2     2     EA     30.00     1
now my problem is in rawdata table record is coming as
test1
test2
but i need it as
test1mat12EA.......
Thanks & Regards,
Ruchi Tiwari

Hi Ruchi,
Are you using excel sheet to upload or text file?
If you are using excel sheet for uplaoding then you can refer to the below code:
P_FILE                 TYPE FILE_NAME OBLIGATORY.
lv_FILE = P_FILE.
****************** CALL FUNCTION MODULE GUI_UPLOAD******************
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      FILENAME = lv_FILE
      FILETYPE = 'ASC'
    TABLES
      DATA_TAB = it_string.
  IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
I hope this helps.
Thanks,
Archana

Similar Messages

  • Insert /*+ Append */ into table...

    Hi Guys,
    if i use /*+ Append */ hint with insert statment then will redologs generate or not?
    Thanks

    Easy to find out...
    SQL> insert /*+ APPEND */ into junk
      2  select *
      3  from all_objects;
    7870 rows created.
    Statistics
            504  recursive calls
             91  db block gets
          86173  consistent gets
              6  physical reads
          11824 redo size
            405  bytes sent via SQL*Net to client
            470  bytes received via SQL*Net from client
              4  SQL*Net roundtrips to/from client
              6  sorts (memory)
              0  sorts (disk)
           7870  rows processedOracle will still generate redo, but much less.

  • Only first row of a mysql table is updated

    Hi,
    I'm using Netbeans 5.5 with Visual Web Pack and trying to update data, stored in a mysql table.
    I use a dropdown list to select a row and show the data in various textfields. This works fine. The problem, that it's not possible to save changes, I enter in the textfields. Everytime only the first row of the table will be (over)written. This happens also with the derby database. I checked the tutorial about inserting, updatting and deleting, it works fine. But they use a table to make changes to the data, so the case is different from mine.
    Can anybody give me a hint? I'm going crazy ...
    Thanx in advance
    Markus

    yes this sounds crazy. i encountered similar problem with textfields. if they are numerous type, don't forget to add integerConverter to the textfield. it helped me out in my case. hope this helps
    dElay

  • Problem to update VBAP-ERLRE field in a standard table----Its urgent

    Hi friends,
       ERLRE: Completion Rule
      I need to create custom utility program to update ERLRE field(already it was set with B for thos specific orders,i need to upadte with null value for those) in production for specific orders.I checked FM: sd_salesdocument_change, but ITEM_IN STRUCTURE  BAPISDITM ,ITEM_INX STRUCTURE  BAPISDITMX OPTIONAL
    those two structures not contain ERLRE field. Only  ITEMS_EX STRUCTURE  BAPISDIT OPTIONAL contain ERLRE field.
    It does not have any x structure corresponding it.
    Please help me how to update that field? Is there any other solution for that?
    Thanks,
    Monica

    Hi Rob,
    I am doing the same way what you told, but its not updation data in table. Can you please check my code what i had done.
    DATA: header_in     LIKE bapisdhd1,
          header_in_x   LIKE bapisdhd1x,
          item_in       LIKE bapisditm  OCCURS 0 WITH HEADER LINE,
          item_in_x     LIKE bapisditmx OCCURS 0 WITH HEADER LINE,
          return        LIKE bapiret2   OCCURS 0 WITH HEADER LINE,
          ITEMS_EX      LIKE BAPISDIT OCCURS 0 with header line.
    DATA: rec_ok TYPE char1.
    DATA: t_vbak LIKE vbak OCCURS 0 WITH HEADER LINE.
    DATA: t_vbap LIKE vbap OCCURS 0 WITH HEADER LINE.
    DATA: icnt TYPE i,
          gcnt(1) TYPE c,
          g_ordertype LIKE vbak-auart,
          c_zso(3) TYPE c VALUE 'ZSO'.  " sales order type
    SELECT vbeln FROM vbak INTO  corresponding fields of  TABLE t_vbak
                           WHERE vbeln = '0090000141'.
    CHECK sy-subrc = 0.
    LOOP AT t_vbak.
    Ini structures
      CLEAR header_in.
      CLEAR header_in_x.
    Ini tables
      CLEAR   item_in.
      REFRESH item_in.
      CLEAR   item_in_x.
      REFRESH item_in_x.
      CLEAR   items_ex.
      REFRESH items_ex.
      CLEAR   return.
      REFRESH return.
      SELECT vbeln posnr  INTO CORRESPONDING FIELDS OF TABLE t_vbap
                                        FROM vbap
                                        WHERE vbeln = t_vbak-vbeln AND posnr = '000100'.
      CHECK sy-subrc = 0.
    Set header data
      header_in_x-updateflag = 'U'.
    Set line item data
      LOOP AT t_vbap WHERE vbeln = t_vbak-vbeln.
        items_ex-operation = '005'.
        items_ex-doc_number = t_vbap-vbeln.
        items_ex-itm_number = t_vbap-posnr.
        items_ex-updat_flag = 'X'.
        items_ex-end_rule = 'C'.
        APPEND items_ex.
        CLEAR items_ex.
      ENDLOOP.
    Disable dialog
      CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.
    Run BAPI
      CALL FUNCTION 'SD_SALESDOCUMENT_CHANGE'
        EXPORTING
          salesdocument     = t_vbak-vbeln
          order_header_in   = header_in
          order_header_inx  = header_in_x
          behave_when_error = 'P'
          call_from_bapi    = 'X'
        TABLES
          return            = return
         item_in           = item_in
         item_inx          = item_in_x
          items_ex          = items_ex.
    Check for errors
      IF sy-subrc = 0.
        LOOP AT return.
          IF return-type = 'E'.
            rec_ok = 'N'.
            EXIT.
          ENDIF.
           IF return-type = 'S'.
            write:/ 'success'.
          ENDIF.
        ENDLOOP.
        IF rec_ok  = 'N'.
          ROLLBACK WORK.
              ELSE.
          COMMIT WORK AND WAIT.
          WRITE:/ 'Success_flag?'.
        ENDIF.
      ENDIF.
    ENDLOOP.

  • Problem while adding a new field to a Z-table

    My attributes are mater table with maintenance allowed and taken APPl0 as data class.
    Now i am trying to add another field to this table and it says you have no authorizations in the log.
    I checked in SU53, actiity is 42 there...
    how can i no wether i have authorizations 2 chg a table or not?if this is the case, it should pop-up a msg when we go for a chg mode itself.. right???
    any clues guyz what shud i do?
    regds
    kiran

    Hi,
    Do u want to know about the authorization means go to table maintenance generator first.
    Now get the authorization object of your table.
    Goto transaction SU21.
    List of object class will be displayed.
    Double click the object class BC_A.
    Now a list of object will be displayed.
    Double click the object S_TABU_DIS (Table Maintenance)
    U will find wat all fields used in tht, ACTVT is the field which specifies the activities of ur table.
    Reward mark if this is useful.
    Ram.

  • Adding only one field of an internal table.

    Hi gurus,
    I have an internal table with values Brand , Country, Code & Amount.
    with values as follows
    Brand     Country    Code          Amount
    1533       IN            121213       56.00
    1533       IN            121213       75.00
    1533       IN            138808       66.00
    1533       BR           121111      23.00
    1533       BR           121212      46.00
    Now i want a sum total of amounts based on country( The code is ignored).
    Brand     Country    Code          Amount
    1533       IN                             197.00
    1533       BR                            69.00
    I already tried the COLLECT statement but was not successful,
    Any ideas will be welcomed.
    Regards,
    K

    hiiii
    use following code..you will solve your problem by that.
    FORM display_flight_data .
      LOOP AT t_flight INTO fs_sflight.
        IF s_carrid EQ fs_sflight-carrid
           AND sflight-connid EQ fs_sflight-connid.
          WRITE: /20 fs_sflight-fldate COLOR 2,
          40 fs_sflight-seatsmax COLOR 2,
          58 fs_sflight-seatsocc COLOR 2.
        ELSE.
          ULINE.
          WRITE: /1(50) 'Total Booking So Far ' COLOR 3, w_total COLOR 3.
          WRITE:/10 fs_sflight-carrid COLOR 5,
             20 fs_sflight-connid COLOR 5.
          w_payment = w_payment + fs_sflight-paymentsum.
          w_total = w_payment.
          w_grandtotal = w_payment + w_total.
          w_finaltotal = w_grandtotal.
        ENDIF.
        s_carrid = fs_sflight-carrid.
        sflight-connid = fs_sflight-connid.
      ENDLOOP.
      WRITE: /1(50) 'Total Amount Of Bookings So Far For ' COLOR 3 ,
                     w_finaltotal COLOR 3.
    ENDFORM.                    " display_flight_data
    reward if useful
    thx
    twinkal

  • Problem to determine the proper fields of the proper tables

    i need the table names for  the fields . The field descriptions are given below.
    partner address1
    partner address2
    partner address3
    partner address4
    city
    country
    post code
    partner email
    in SD

    Hi,
      Use tables KNA1-ADRNR & goto table ADRC there you will find the address of partner.
    Cheers,
    Bujji

  • How to get around 34 fields to a final table to display in ALV grid

    Hi,
    I am working in a ALV grid report. I have to display around 34 fields in ALV grid. How to fatch all fields and appending into final internal table.
    SAP plant code          LIPS-WERKS
    Sales Order #      Sales document Numbers     VBAK-VBELN
    Delivery item Number          LIPS-POSNR
    PO # (Affiliate)     Purchase Order Numbers     VBKD-BSTKD
    SAP invoice #.     Invoice Number     VBRK-VBELN
    Ship-to-Customer No          KNA1--KUNNR
    Ship-to-Customer Name          KNA1-NAME1
    Ship-to-Customer Street           ADDR1_DATA u2013 STREET
    Ship-to-Customer house number           ADDR1_DATA- HOUSE_NUM1 
    Ship-to-Customer City           ADDR1_DATA- CITY1
    Ship-to-Customer Region          ADDR1_DATA- REGION
    Ship-to-Customer Postal code          ADDR1_DATA- POST_CODE1
    Ship-to-Customer Country          ADDR1_DATA- COUNTRY
    Bill-to customer no           KNA1-KUNNR
    Bill-to customer name           KNA1-NAME1
    Bill-to-Customer Street           ADDR1_DATA u2013 STREET
    Bill-to-Customerhouse number           ADDR1_DATA- HOUSE_NUM1 
    Bill -to-Customer City           ADDR1_DATA- CITY1
    Bill-to-Customer Region          ADDR1_DATA- REGION
    Bill-to-Customer Postal code          ADDR1_DATA- POST_CODE1
    Bill-to-Customer Country          ADDR1_DATA- COUNTRY
    Material Code          LIPS-MATNR
    Material Description          LIPS-ARKTX 
    Delivered Quantity          LIPS-LFIMG
    Unit of Measure          LIPS-MEINS
    Invoiced Quantity          VBRP-FKIMG
    unit ICB price          vbrp-netwr /vbrp-fkimg
    Line item Value (ICB Price)          VBRP-NETWR
    Currency          VBRK- WAERK
    Country Of Origin          EIPO_HERKL
    Date of Shipment          LIKP-WADAT_IST
    Total Gross Weight          LIKP- BTGEW
    Unit of Measure          LIKP- GEWEI
    Total Dollar Value of Invoice          VBRK- NETWR
    Currency          VBRK-WAERK
    Waiting quick response with any example
    Regards
    Dhar

    the only way by which u can do is by linking all these tables together using their primary keys.
    so start finding the primary key and link the tables and then append all these values into one master internal table.
    pk

  • Field EBELN into table EQUP

    Hi gurus,
    I need some help:
    Is it possible, via user exit or something similar, to add the field EKKO-EBELN into table EQUP? It should be useful just right to LIFNR column.
    THe idea is to have the doc. number into quota arrangement.
    Thanks,
    G

    Do you have a user exit that should be used with MRP?
    And is it also possible to add EBELN field into table control of screen #215 of transaction MEQ1?
    Edited by: Giovanni Usberti on Aug 6, 2008 2:41 PM

  • How to get the text field in the header for only first page of the report

    Hi,
    I am developing reports in BI Publisher Enterprise where i am facing problem i.e., i have to get some text field in header,for only first page in the result but it is displaying in all the other pages of the report in result.So,please if you have any idea of how to solve it, please reply.It is required as early as possible.
    Thanks in Advance

    Invalid path? What are you doing? Writing the report output to an invalid directory?
    Where are your terms and conditions? It would be very easy just to put them in a database table and select them in your report query.

  • Jpa native query returns only first character of a field

    Hi,
    I've a JPA native query that returns two fields from my oracle database. The first field is a CHAR(2) field with two char values in it, like 'OZ' etc.
    The problem is, as soon as the query is executed it returns only first character of field1. If the actual value of field1 is like 'OZ' then it returns only 'Z'.
    Query nativeQueryForProfileInfo = getManager().createNativeQuery(queryToRun);
    List list = nativeQueryForProfileInfo.getResultList();
    Please help,
    thanks

    There could be several explanations here and it's difficult to say without having more details, possibilities are
    There is something wrong with your display logic.
    There is something wrong with your mapping.

  • Select only first 10 chars from the field in a table while writlng a selec

    hi experts,
    In a table  one field contains a value of above 10 characters (ex 10 or 15 or 20 characters).But i want to select
    only first 10 characters from this field while writing a select statement.
    This logic should be included in select statement.
    please gime immediate solution.
    My question is understood.

    Hi,
    Try this one
    data : begin of itab occurs 0,
            maktx(10) type c,
    end of itab.
    " though the length of MAKTX is 40 you only get 10 chars
    select maktx from makt into table itab up to 10 rows.
    if sy-subrc is initial.
    endif.
    " Suppose the field name of table you want to select is MAKTX then declare
    " Your internal table in the above manner, it will automatically fit into it and will get 10 Chars only
    " Instead of burding the select query / DB interface use the above.
    Cheerz
    Ram

  • I installed First time Photoshop CS5 on my new PC (operation system windows 8.1, 64 bit). Sie prpram runs without problems so far, only the update is not possible.

    Bei aktalisierung erfolgt das download, nach ende Download kommt Fehlermeldung fehler beim Download (Installation nicht möglich, Versuchen Sie es später noch einmal.
    Kennt jemand das Problem, was kann ich tun?
    Harald Bässle
    Emailaddresse: [email protected]

    Hello,
    I installed the newest Application Manager some updates seems to be installed now but extension manager CS5 5.0 update is not successful > error code U43M1D207. What I must do?
    I this the right way t answer?
    Whating for reply
    Thanks
    Harald
    Von: R_Kelly 
    Gesendet: Freitag, 29. August 2014 03:41
    An: Harald Bässler
    Betreff:  I installed First time Photoshop CS5 on my new PC (operation system windows 8.1, 64 bit). Sie prpram runs without problems so far, only the update is not possible.
    I installed First time Photoshop CS5 on my new PC (operation system windows 8.1, 64 bit). Sie prpram runs without problems so far, only the update is not possible.
    created by R_Kelly <https://forums.adobe.com/people/R_Kelly>  in Photoshop for Beginners - View the full discussion <https://forums.adobe.com/message/6683157#6683157>

  • Problem with creating an dynamic internal table with only one field.

    Hi,
    i create an internal table like this:
    FIELD-SYMBOLS: <GT_ITAB>      TYPE TABLE,
                   <GS_ITAB>,
                   <FS>.
    DATA: GT_DATA TYPE REF TO DATA.
    DATA: GS_DATA TYPE REF TO DATA.
    DATA: TABNAME   LIKE DD03L-TABNAME.
    DATA: FIELDNAME LIKE DD03L-FIELDNAME.
    DATA: TBFDNAM   TYPE TBFDNAM VALUE 'LFA1-NAME1'.
    SPLIT TBFDNAM AT '-' INTO TABNAME FIELDNAME.
    CREATE DATA GT_DATA TYPE TABLE OF (TABNAME).
    ASSIGN GT_DATA->* TO <GT_ITAB>.
    CREATE DATA GS_DATA  LIKE LINE OF <GT_ITAB>.
    ASSIGN GS_DATA->* TO <GS_ITAB>.
    SELECT * FROM (TABNAME) INTO CORRESPONDING FIELDS OF TABLE <GT_ITAB>.
      BREAK-POINT.
    it works OK.
    Now i want to create an internal table not like LFA1 but with LFA1-NAME1 Field TBFDNAM.
    It's not only LFA1-NAME1 it shell be the value of TBFDNAM.
    When i change
    CREATE DATA GT_DATA TYPE TABLE OF (TABNAME).
    to
    CREATE DATA GT_DATA TYPE TABLE OF ( TBFDNAM).
    i get an shortdump.
    Any idea?
    Regards, Dieter

    Hi Dieter,
    Your approach is ok, but it will create dynamic table without a structure of NAME1. Only the line type will be suitable (but field name will not exists -> hence the error in the select statement).
    In this case you need to create a dynamic table which structure consists of one field named NAME1.
    This code is the appropriate one:
    " your definitions
    DATA: tabname LIKE dd03l-tabname.
    DATA: fieldname LIKE dd03l-fieldname.
    DATA: tbfdnam TYPE tbfdnam VALUE 'LFA1-NAME1'.
    FIELD-SYMBOLS <gt_itab> TYPE table.
    "new ones
    DATA: it_fcat TYPE lvc_t_fcat WITH HEADER LINE.
    DATA: gt_itab TYPE REF TO data.
    " get table and fieldname
    SPLIT tbfdnam AT '-' INTO tabname fieldname.
    " create dynamic table with structure NAME1 (only one field)
    it_fcat-fieldname = fieldname.
    it_fcat-tabname = tabname.
    APPEND it_fcat.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
      EXPORTING
        it_fieldcatalog           = it_fcat[]
      IMPORTING
        ep_table                  = gt_itab
      EXCEPTIONS
        generate_subpool_dir_full = 1
        OTHERS                    = 2.
    CHECK sy-subrc = 0.
    " dereference table
    ASSIGN gt_itab->* TO <gt_itab>.
    " insert data only to NAME1 field
    SELECT * FROM (tabname) INTO CORRESPONDING FIELDS OF TABLE <gt_itab>.
    I checked, this works fine:)
    Regards
    Marcin

  • Facing problem in populating a output field only

    Hi,
    I have created two fields on the screen with names code and description. My requirement is to get F4 help on code field and on selecting value from the popup, the description field as well should filled. I am using FM 'MD_POPUP_SHOW_INTERNAL_TABLE' to get a popup. The popup I am getting is alright as it is showing values for both columns i.e. code and its description. But anyhow when I select a value from the popup list, code field gets filled but the other field remains empty.
    I even debugged the program, and there I found that control is assinging values to both fields, but its not showing on screen for description field.
    Need help.
    Thanks,
    Ram

    Hi,
    Check this function module MD_SHOW_PLANNING_REQUESTS.It is using that function module.
    Check this code.May be it can help you.
                           Tables Declaration
    tables : vbap.         " Sales Document: Item Data
                         Constant Declaration                                      *
    CONSTANTS:
      C_X TYPE C VALUE 'X'.     " Translate to Uppercase
                         Variable Declaration                                      *
    Variable for Table index
      data v_sytabix like sy-tabix.
    Variable for Program name
      data L_NAME LIKE SYST-REPID.
                            Ranges Declaration                                     *
    Range for getting values form selection screen
    DATA: BEGIN OF range1 OCCURS 0,
             SIGN(1),
             OPTION(2),
             LOW  LIKE vbap-vbeln,
             high like vbap-vbeln,
          END OF range1.
                            Structure Declaration                                  *
                       Internal table Declaration                                  *
    Internal table for Report output
      data: begin of i_vbap occurs 0,
              vbeln like vbap-vbeln,            " Sales Document
              posnr like vbap-posnr,            " Sales Document item
            end of i_vbap.
    Internal table for output to the F4 help
      data: begin of I_DISPLAY occurs 0,
              vbeln like vbap-vbeln,            " Sales Document
              posnr like vbap-posnr,            " Sales Document item
            end of I_DISPLAY.
    Internal table for return value form function module
      DATA: BEGIN OF I_RETURNVAL OCCURS 0.
              INCLUDE STRUCTURE DDSHRETVAL.     " Interface Structure Search
      DATA: END OF I_RETURNVAL.
    Internal table for F4 help field heading
      DATA: I_FIELDTAB LIKE DFIES OCCURS 0 WITH HEADER LINE.
    Internal table for getting screen values from selection screen
      data L_SCR_FIELDS LIKE DYNPREAD OCCURS 1 WITH HEADER LINE.
                         Field-Symbols                                   *
                         Selection-screen                                *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME title text-001.
      select-options:
            S_VBELN for vbap-vbeln no intervals,
            S_POSNR for vbap-posnr no intervals.
    SELECTION-SCREEN end OF BLOCK B1.
                         AT SELECTION-SCREEN ON VALUE-REQUEST            *
    at selection-screen on value-request for s_posnr-low.
      clear: L_SCR_FIELDS, I_FIELDTAB, i_display, I_RETURNVAL.
      refresh: L_SCR_FIELDS, I_FIELDTAB, i_display, I_RETURNVAL.
      L_NAME = SYST-REPID.
      MOVE 'S_VBELN-LOW' TO L_SCR_FIELDS-FIELDNAME.
      APPEND L_SCR_FIELDS.
    Call the Function module DYNP_VALUES_READ to get the values form
    selection screen
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          DYNAME                         = L_NAME
          DYNUMB                         = SYST-DYNNR
          TRANSLATE_TO_UPPER             = C_X         " X
        TABLES
          DYNPFIELDS                     = L_SCR_FIELDS
       EXCEPTIONS
         INVALID_ABAPWORKAREA           = 1
         INVALID_DYNPROFIELD            = 2
         INVALID_DYNPRONAME             = 3
         INVALID_DYNPRONUMMER           = 4
         INVALID_REQUEST                = 5
         NO_FIELDDESCRIPTION            = 6
         INVALID_PARAMETER              = 7
         UNDEFIND_ERROR                 = 8
         DOUBLE_CONVERSION              = 9
         STEPL_NOT_FOUND                = 10
         OTHERS                         = 11
      IF SY-SUBRC eq 0.
        LOOP AT L_SCR_FIELDS.
          range1-sign = 'I'.
          range1-option = 'EQ'.
          range1-low = L_SCR_FIELDS-FIELDVALUE.
          range1-high = space.
          append range1.
        ENDLOOP.
      ENDIF.
    F4 help Field headings
      I_FIELDTAB-TABNAME = 'I_DISPLAY'.
      I_FIELDTAB-FIELDNAME = 'VBELN'.
      I_FIELDTAB-POSITION = '1'.
      I_FIELDTAB-OUTPUTLEN = '10'.
      I_FIELDTAB-INTTYPE = 'C'.
      I_FIELDTAB-INTLEN = '10'.
      APPEND I_FIELDTAB.
      I_FIELDTAB-FIELDNAME = 'POSNR'.
      I_FIELDTAB-POSITION = '2'.
      I_FIELDTAB-OFFSET = '10'.
      I_FIELDTAB-OUTPUTLEN = '6'.
      I_FIELDTAB-INTTYPE = 'N'.
      I_FIELDTAB-INTLEN = '6'.
      APPEND I_FIELDTAB.
    Retrieve sales document, Sales document item from table Sales
    Document: Item Data(VBAP).
    Primary keys used for selection: VBELN
      select vbeln posnr from vbap
                   into table i_display
                   where vbeln in range1.
    Call the function module F4IF_INT_TABLE_VALUE_REQUEST for F4 values
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD               = 'POSNR'
          WINDOW_TITLE           = 'Line Item'
          VALUE_ORG              = 'S'
          MULTIPLE_CHOICE        = C_X           " (for muliple selection)
        TABLES
          VALUE_TAB              = I_DISPLAY
          FIELD_TAB              = I_FIELDTAB
          RETURN_TAB             = I_RETURNVAL
        EXCEPTIONS
          PARAMETER_ERROR        = 1
          NO_VALUES_FOUND        = 2
          OTHERS                 = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
    Star for For single values
      READ TABLE I_RETURNVAL INDEX 1.
       S_POSNR-LOW = I_RETURNVAL-FIELDVAL.
    End for the single values
    Start For multiple selection
       loop at i_returnval.
         s_posnr-sign = 'I'.
         s_posnr-option = 'EQ'.
         s_posnr-low = I_RETURNVAL-FIELDVAL.
         append s_posnr.
       endloop.
       sort s_posnr.
       read table s_posnr index 1.
    End for multiple selection
      ENDIF.
                         Start-of-selection                                        *
    start-of-selection.
    Retrieve sales document, Sales document item from table Sales
    Document: Item Data(VBAP).
    Primary keys used for selection: VBELN
      select vbeln posnr from vbap
                        into table i_vbap
                        where vbeln in s_vbeln
                          and posnr in s_posnr.
    if the above selection is successful continue the process else exit *
    form the report
      if sy-subrc ne 0.
       message e002 with 'No data to display'.
      endif.
                           End-of-selection                                        *
    end-of-selection.
      if not i_vbap[] is initial.
        loop at i_vbap.
          write:/ i_vbap-vbeln, i_vbap-posnr.
        endloop.
      endif.

Maybe you are looking for