Header Text selection Option

Hi,
  I have developed a report which include a number of fields that come from the header text of the document.  Besides, those fields are also used as the selection options.  So, I use the function module READ_TEXT to retrieve it and compare it.  The problem is the performance of the report is very bad.  It takes 3 mins to get 3 records.   Is there any way to resolve this??
SELECT-OPTIONS: S_WADAT FOR LIKP-WADAT_IST.
  PARAMETERS: P_MAWB LIKE WA_REPORT-KZABE.
  PARAMETERS: P_HAWB LIKE LIKP-BOLNR.
  PARAMETERS: P_MATNR LIKE LIPS-MATNR.
  PARAMETERS: P_LOT(20) TYPE C.
  CLEAR: I_REPORT,I_DELIVERY,I_DELIVERY_INFO.
  REFRESH: I_REPORT,I_DELIVERY,I_DELIVERY_INFO.
  DATA WHERE_TAB(80) OCCURS 10 WITH HEADER LINE.
  DATA: BEGIN OF LTEXT OCCURS 50.
          INCLUDE STRUCTURE TLINE.
  DATA: END OF LTEXT.
  IF NOT P_HAWB IS INITIAL.
    CONCATENATE ' BOLNR = ' WHERE_TAB INTO WHERE_TAB.
    CONCATENATE WHERE_TAB '''' INTO WHERE_TAB.
    CONCATENATE WHERE_TAB P_HAWB INTO WHERE_TAB.
    CONCATENATE  WHERE_TAB '''' INTO WHERE_TAB.
    APPEND WHERE_TAB.
  ENDIF.
  IF NOT P_MATNR IS INITIAL.
    IF NOT WHERE_TAB IS INITIAL.
      CONCATENATE ' AND MATNR = ' WHERE_TAB INTO WHERE_TAB.
    ELSE.
      CONCATENATE ' MATNR = ' WHERE_TAB INTO WHERE_TAB.
    ENDIF.
    CONCATENATE WHERE_TAB '''' INTO WHERE_TAB.
    CONCATENATE WHERE_TAB P_MATNR INTO WHERE_TAB.
    CONCATENATE  WHERE_TAB '''' INTO WHERE_TAB.
    APPEND WHERE_TAB.
  ENDIF.
  SELECT A1~VBELN
         WADAT_IST
         BOLNR
         C1~LIFNR
         B1~MATNR
         LFIMG
         BTGEW
         B1~CHARG
    INTO CORRESPONDING FIELDS OF TABLE TMP_REPORT
    FROM LIKP AS A1 JOIN LIPS AS B1 ON A1~VBELN = B1~VBELN
        JOIN MCHA AS C1 ON B1~MATNR = C1~MATNR
                           AND
                           B1~WERKS = C1~WERKS
                           AND
                           B1~CHARG = C1~CHARG
     WHERE LFART = 'EL'
           AND
           WADAT_IST IN S_WADAT
           AND
           B1~CHARG NE ''
           AND
           B1~WERKS = 'ABC'
           AND
           (WHERE_TAB)
  SORT TMP_REPORT BY VBELN.
  DATA: V_FLAG TYPE I,
        V_EXCLUDE TYPE I,
        V_LOT_EXCLUDE TYPE I.
  V_FLAG = 0.
  V_EXCLUDE = 0.
  V_LOT_EXCLUDE = 0.
  IF SY-SUBRC = 0.
* trim the parameter space
    SHIFT P_MAWB RIGHT DELETING TRAILING SPACE.
    SHIFT P_MAWB LEFT DELETING LEADING SPACE.
    SHIFT P_LOT RIGHT DELETING TRAILING SPACE.
    SHIFT P_LOT LEFT DELETING LEADING SPACE.
    LOOP AT TMP_REPORT.
      AT NEW VBELN.
        V_FLAG = 1.
        V_EXCLUDE = 0.
      ENDAT.
      IF V_FLAG = 1.
        PERFORM GET_HEADER_TEXT
              TABLES
                   LTEXT
              USING
                   'Z3IH'
                    TMP_REPORT-VBELN
        READ TABLE LTEXT INDEX 1.
        SPLIT LTEXT-TDLINE AT ':' INTO
        TMP_REPORT-VERUR TMP_REPORT-VERUR.
        READ TABLE LTEXT INDEX 2.
        SPLIT LTEXT-TDLINE AT ':' INTO
        TMP_REPORT-KZGBE TMP_REPORT-KZGBE.
        READ TABLE LTEXT INDEX 3.
        SPLIT LTEXT-TDLINE AT ':' INTO
        TMP_REPORT-KZABE TMP_REPORT-KZABE.
        READ TABLE LTEXT INDEX 4.
        SPLIT LTEXT-TDLINE AT ':' INTO
        TMP_REPORT-STABE TMP_REPORT-STABE.
        READ TABLE LTEXT INDEX 5.
        SPLIT LTEXT-TDLINE AT ':' INTO
        TMP_REPORT-PRONU TMP_REPORT-PRONU.
        READ TABLE LTEXT INDEX 6.
        SPLIT LTEXT-TDLINE AT ':' INTO
        TMP_REPORT-LADEL TMP_REPORT-LADEL.
        SHIFT TMP_REPORT-KZABE RIGHT DELETING TRAILING SPACE.
        SHIFT TMP_REPORT-KZABE LEFT DELETING LEADING SPACE.
        MOVE-CORRESPONDING TMP_REPORT TO WA_REPORT.
        MOVE-CORRESPONDING TMP_REPORT TO WA_TMPREPORT.
        V_FLAG = 0.
      ELSE.
        MOVE TMP_REPORT-VBELN TO WA_REPORT-VBELN.
        MOVE TMP_REPORT-LIFNR TO WA_REPORT-LIFNR.
        MOVE TMP_REPORT-MATNR TO WA_REPORT-MATNR.
        MOVE TMP_REPORT-LFIMG TO WA_REPORT-LFIMG.
      ENDIF.
      PERFORM GET_LOT_CODE USING
                                 WA_REPORT-MATNR
                                 '3LTU'
                                 WA_TMPREPORT-CHARG
                                 WA_REPORT-LOT.
      IF V_EXCLUDE <> 1 AND P_MAWB NE ''
        AND WA_TMPREPORT-KZABE NE P_MAWB .
        V_EXCLUDE = 1.
      ENDIF.
      SHIFT WA_REPORT-LOT RIGHT DELETING TRAILING SPACE.
      SHIFT WA_REPORT-LOT LEFT DELETING LEADING SPACE.
      IF P_LOT NE '' AND P_LOT NE WA_REPORT-LOT.
        V_LOT_EXCLUDE = 1.
      ELSE.
        V_LOT_EXCLUDE = 0.
      ENDIF.
      IF V_EXCLUDE <> 1 AND V_LOT_EXCLUDE <> 1.
        APPEND WA_REPORT TO I_REPORT.
        CLEAR WA_REPORT.
        CLEAR TMP_REPORT.
      ENDIF.
    ENDLOOP.
Regards,
Kit

Here is my code
  FORM GET_LOT_CODE USING MATCODE PLANT BATCH LOT_CODE.
  DATA: W_OBJECTTAVLE LIKE BAPI1003_KEY-OBJECTTABLE VALUE 'MCHA',
        W_CLASSNUM LIKE BAPI1003_KEY-CLASSNUM VALUE 'Z003',
        W_CLASSTYPE LIKE BAPI1003_KEY-CLASSTYPE VALUE '022',
        IT_ALLOCVALUESNUM LIKE BAPI1003_ALLOC_VALUES_NUM OCCURS 0,
        IT_ALLOCVALUESCHAR LIKE BAPI1003_ALLOC_VALUES_CHAR OCCURS 0,
        WA_ALLOCVALUESCHAR LIKE BAPI1003_ALLOC_VALUES_CHAR,
        IT_ALLOCVALUESCURR LIKE BAPI1003_ALLOC_VALUES_CURR OCCURS 0,
        IT_RETURN LIKE BAPIRET2 OCCURS 0.
  DATA: BEGIN OF IT_OBJECT OCCURS 0.
          INCLUDE STRUCTURE BAPI1003_OBJECT_KEYS.
  DATA: END OF IT_OBJECT.
  DATA: W_OBJECT LIKE BAPI1003_KEY-OBJECT.
  CLEAR: IT_OBJECT, IT_RETURN.
  REFRESH: IT_OBJECT, IT_RETURN.
  IT_OBJECT-KEY_FIELD = 'MATNR'.
  IT_OBJECT-VALUE_INT = MATCODE.
  APPEND IT_OBJECT.
  IT_OBJECT-KEY_FIELD = 'WERKS'.
  IT_OBJECT-VALUE_INT = PLANT.
  APPEND IT_OBJECT.
  IT_OBJECT-KEY_FIELD = 'CHARG'.
  IT_OBJECT-VALUE_INT = BATCH.
  APPEND IT_OBJECT.
  CALL FUNCTION 'BAPI_OBJCL_CONCATENATEKEY'
       EXPORTING
            OBJECTTABLE    = 'MCHA'
       IMPORTING
            OBJECTKEY_CONC = W_OBJECT
       TABLES
            OBJECTKEYTABLE = IT_OBJECT
            RETURN         = IT_RETURN.
  CLEAR: IT_RETURN.
  REFRESH: IT_RETURN.
  CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
       EXPORTING
            OBJECTKEY       = W_OBJECT
            OBJECTTABLE     = W_OBJECTTAVLE
            CLASSNUM        = W_CLASSNUM
            CLASSTYPE       = W_CLASSTYPE
       TABLES
            ALLOCVALUESNUM  = IT_ALLOCVALUESNUM
            ALLOCVALUESCHAR = IT_ALLOCVALUESCHAR
            ALLOCVALUESCURR = IT_ALLOCVALUESCURR
            RETURN          = IT_RETURN.
  LOOP AT IT_ALLOCVALUESCHAR INTO WA_ALLOCVALUESCHAR.
    IF WA_ALLOCVALUESCHAR-CHARACT = 'Z_VENDOR_LOT_NUMBER'.
      LOT_CODE = WA_ALLOCVALUESCHAR-VALUE_CHAR.
    ENDIF.
  ENDLOOP.
ENDFORM.

Similar Messages

  • How to use select-options in the function module of import parameter ?

    Hi ...
       I have created a BAPI and tested in SWO1 tcode , by giving the single value for an company code ( BUKRS ) , it executed properly .
    Same thing is working after implementing in a program .
    so now it is working for fetching a single company code details .
    My requirement is : I want to use select-options in program as well as in function module IN IMPORT PARAMETER.
    Program :
    REPORT  ZTEST.
    TABLES : T001 , ZBAPI_STR .
    TYPES : BEGIN OF TY_ITEM  .
              INCLUDE STRUCTURE ZBAPI_STR .
    TYPES : END OF TY_ITEM .
    DATA :WA_ITEM TYPE TY_ITEM ,
          ITEM LIKE STANDARD TABLE OF WA_ITEM INITIAL SIZE 0 .
    PARAMETER : BUKRS TYPE ZBAPI_STR-BUKRS.
    call function 'ZBAPI_FMT001'
      exporting
        bukrs         =  BUKRS
    IMPORTING
      RETURN        =
      tables
        itemtab       = ITEM
    IF ITEM IS NOT INITIAL .
      LOOP AT ITEM INTO WA_ITEM .
        WRITE : / WA_ITEM-BUKRS , WA_ITEM-BUTXT , WA_ITEM-ORT01 , WA_ITEM-LAND1 .
      ENDLOOP.
    ENDIF.
    FUNCTION MODULE :
    FUNCTION ZBAPI_FMT001.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(BUKRS) TYPE  EFG_TAB_RANGES
    *"  EXPORTING
    *"     VALUE(RETURN) TYPE  BAPIRET2
    *"  TABLES
    *"      ITEMTAB STRUCTURE  ZBAPI_STR
    SELECT BUKRS BUTXT ORT01 LAND1 FROM T001 INTO TABLE ITEMTAB WHERE BUKRS = BUKRS .
    ENDFUNCTION.
    Regards
    Deepa.

    I have given a similiar example which i did
    Declare a
    Table type:Z_TT_PONUM             
    Short text  :  Select options  PO Number
    in SE11 tcode with row type eg: Z_ST_PONUM
    create a structure (this will be the row type)
    Structure          Z_ST_PONUM            
    Short text         Select Options Field PO number
    Compenent  Compent type
    SIGN       BAPISIGN      Inclusion/exclusion criterion SIGN for range tables
    OPTION       BAPIOPTION      Selection operator OPTION for range tables
    LOW       EBELN                      Purchasing Document Number
    HIGH       EBELN                      Purchasing Document Number
    In the function module import
    give as
    I_PO_NUM     TYPE     Z_TT_PONUM     opt  pass value Select options  PO Number
    Hope this is exactly what you want to know.
    So you create a structure simliar to mine but the low an high whould be your component
    then a table type  and then include that in the BAPI.
    Then pass your select-option value to this BAPI when you call this BAPI in the program

  • Getting error of Defining an internal table with header line, SELECT-OPTIO

    Hi all,
    i have a coding for my smart form,In this coding i have define an structure which being used,but when i execute it it give me
    error of Defining an internal table with header line, SELECT-OPTIONS, and RANGES is not allowed within a structure.Even tough you can see that in  my coding im not using SELECT-OPTION or RANGES,but can't understand why it gives me this error.
    Following are the code:
      DATA: BEGIN OF traptab OCCURS 50.
            INCLUDE STRUCTURE mseg.
      DATA: vgart LIKE mkpf-vgart,
            blart LIKE mkpf-blart,
            blaum LIKE mkpf-blaum,
            bldat LIKE mkpf-bldat,
            budat LIKE mkpf-budat,
            cpudt LIKE mkpf-cpudt,
            cputm LIKE mkpf-cputm,
            aedat LIKE mkpf-aedat,
            usnam LIKE mkpf-usnam,
            tcode LIKE mkpf-tcode,
            xblnr LIKE mkpf-xblnr,
            bktxt LIKE mkpf-bktxt,
            frath LIKE mkpf-frath,
            frbnr LIKE mkpf-frbnr,
            wever LIKE mkpf-wever,
          END OF traptab. 
    Thanks & Regards,
    sappk25

    thanks

  • Help with Select Option

    Hi
    I have this select option in the user screen
    SELECT-OPTIONS: ID FOR PA0094-FPNCD.            " Emp Id
    But when the user tries to look up the code by clicking on to the square box beside the input box it gives the user all the entries from the Field FPNCD.
    My question is there anyway i could limit it to only show certain codes when they click on the box. (In this case codes for USA only).
    Thanks in advance...

    Hi anwarul,
    May be in this way.
    First pop up the internal table by selecting the required data...
    in your case you want the data of only USA.
    Make select query according to ur requirement..
    and then use the FM  <b>F4IF_INT_TABLE_VALUE_REQUEST</b>
    Go through the below example.
    tables kna1.
    data:
    begin of t_values occurs 2,
    value like kna1-begru,
    end of t_values,
    t_return like ddshretval occurs 0 with header line.
    select-options s_begru for kna1-begru.
    at selection-screen on value-request for s_begru-low.
    clear t_values.
    t_values = 'PAR*'.
    append t_values.
    t_values = 'UGG'.
    append t_values.
    <b>call function 'F4IF_INT_TABLE_VALUE_REQUEST'</b>
    exporting
    retfield = 's_begru'
    value_org = 'S'
    tables
    value_tab = t_values
    return_tab = t_return
    exceptions
    parameter_error = 1
    no_values_found = 2
    others = 3.
    if sy-subrc = 0.
    read table t_return index 1.
    s_begru-low = t_return-FIELDVAL.
    Hope it will be helpful to you.
    <b>Reward Points if it is helpful.</b>
    Thanks & Regards
    ilesh 24x7

  • PUT OWN HELP IN SELECT-OPTIONS ( REPORTS)

    HOW CAN I USE MY OWN QUERY HELP IN SELCT-OPTIONS F4 HELP

    Hi,
    Check this sample code and reward points if it helps.
    tables kna1.
    data:
    begin of t_values occurs 2,
    value like kna1-begru,
    end of t_values,
    t_return like ddshretval occurs 0 with header line.
    select-options s_begru for kna1-begru.
    at selection-screen on value-request for s_begru-low.
    refresh t_values.
    t_values = 'PAR*'.
    append t_values.
    t_values = 'UGG'.
    append t_values.
    call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
    retfield = 'BEGRU'
    value_org = 'S'
    tables
    value_tab = t_values
    return_tab = t_return
    exceptions
    parameter_error = 1
    no_values_found = 2
    others = 3.
    if sy-subrc = 0.
    read table t_return index 1.
    s_begru-low = t_return-fieldval.
    endif.

  • Check Select Options

    Hi Genius,
    Could you please tell me how to check the internal table entries using select options in a subroutine i.e  if the entry exists in  a range of select-options it is to be taken otherwise it is to be neglected.
    I will definitely reward gd point to u but tell me in any case,
    Thnx ,
    Rahul.....................................................

    Here is the simple example ->
    tables : mara.
    data : i_mara like mara occurs 0 with header line.
    select-option s_matnr for mara-matnr.
    start-of-selection.
    select * from mara into table i_mara
                               where matnr <b>in s_matnr.</b>
    if sy-subrc ne 0.
    give error message " No data found ".
    endif.
    for internal table
    loop at i_mara where field in s_matnr
    endloop.
    Thanks
    Seshu
    Message was edited by:
            Seshu Maramreddy
    Message was edited by:
            Seshu Maramreddy

  • Select-Options Processing

    Hi All,
    I have a Select-Option: SF_KOSTL for CSKS-KOSTL.
    I have a ZTable with two fields:
    Username and KOSTL.
    I need to determine if an entry Exists for Every SF_KOSTL (in the Select-option ) in the ZTable for username SY-UNAME.
    IF there is one particular KOSTL, that doesn't have an entry in Ztable, I should ignore that from the SF_KOSTL Select-Options which is used in several other select statements.
    How to overcome this.
    Thanks in Advance...!

    Oh ok.  I see what you need to do now.  Try something like this.  Here you are getting all of the kostl in your range and looping at the internal table and checking against your ztable.
    report zrich_0001 .
    data: icsks type table of csks with header line.
    select-options: s_kostl for icsks-kostl.
    at selection-screen.
      clear icsks.  refresh icsks.
      select * into table icsks from csks
                    where kostl in s_kostl.
      loop at icsks.
    * Check against your table here
    * select Single * from ztable
    *            where uname = sy-uname
    *              and kostl = icsks-kostl.
    * if sy-subrc <> 0.
    *   message w001(00) with 'Kostl will be ignored'.
    * endif.
      endloop.
    Regards,
    Rich Heilman

  • How to use OTR short text for description of select options

    Hi Experts,
    Can some one guide me how to make the description of select option language independant.
    Can't I use OTR text for description? if yes, how is that?
        WD_THIS->M_HANDLER->ADD_SELECTION_FIELD(
        I_ID          = 'SEL_OPEN_LINES'
        IT_RESULT     = LT_RANGE_TABLE
        I_AS_CHECKBOX = ABAP_TRUE
        I_READ_ONLY   = L_READ_ONLY
        I_DESCRIPTION = 'Select Open Lines' ).
    how can i pass OTR text for the string type I_DESRIPTION export parameter of ADD_SELECTION_FIELD method?
    or is there any other way of doing this.
    Any clue is highly appreciated. Thanks.
    Regards,
    Ajay

    Hi,
    Try this out  -
    Use cl_wd_utilities=>GET_OTR_TEXT_BY_ALIAS get the alias text into a string and pass this string variable to the I_DESCRIPTION.
    DATA:
      lv_str type string.
    CALL METHOD cl_wd_utilities=>get_otr_text_by_alias
       EXPORTING
         alias      = 'ZPKG/header'
         language   = sy-langu
       RECEIVING
         alias_text = lv_str.
    WD_THIS->M_HANDLER->ADD_SELECTION_FIELD(
        I_ID          = 'SEL_OPEN_LINES'
        IT_RESULT     = LT_RANGE_TABLE
        I_AS_CHECKBOX = ABAP_TRUE
        I_READ_ONLY   = L_READ_ONLY
        I_DESCRIPTION = lv_str ).
    Regards,
    Lekha.
    Edited by: Lekha on Sep 14, 2009 6:36 PM

  • Displaying Selection option values in header using alv-factory

    Hi all,
    I am using alv factory class 'CL_SALV_TABLE'.
    I want to display selection-option values on my header.
    I have creted grid using class 'CL_SALV_FORM_LAYOUT_GRID' and am displaying other values.
    But am facing problem in displaying selection option values.
    Any pointer on this will be GR8.
    Thanks & Regards.
    Yats.

    Hi,
    Use this sample code.
    form top_of_the_list_main  changing lv_grids type ref to cl_salv_table.
    *Creating instances of the clases
      data :     lv_grid   type ref to  cl_salv_table,
                 lv_header type ref to  cl_salv_form_element,
                 lv_layout type ref to  cl_salv_form_layout_grid.
      move lv_grids to lv_grid.
    *Creating the layout object
      create object lv_layout.
    *Setting the Header Text
      lv_layout->create_label(
                             row     = 1
                             column  = 1
                             text    = text-008 ).
      lv_header = lv_layout.
      lv_grid->set_top_of_list( lv_header ).
    endform.                    " TOP_OF_THE_LIST_MAIN
    Loop it and keep changing the row and colom..Pass the selection option to the text field.
    Regards
    Ansair

  • Text element assigned to select options not showing

    Hi guys,
    We have a problem in shaowing the text assigned to the select-options...
    When we run the program the text element ssigned to the select options is not showing instead the element name is shown.
    The original language is german, and it wont show the english word we appended to as text element for select-options.
    example:
    AUART insteat od blocked order
    How can we show the text elemen when we run the program?
    Thanks!

    Hi Mark,
    Go to the program text elements and select the Selection Texts tab,
    There you fill find the select option for AUART and the corresponding text maintained.
    You need to maintain translations for this text entered.
    Chose Goto (in menu bar) -> Translation
    Then maintain translation in English.
    Regards,
    Aditya

  • OVS Help in Select Options-Text to be Shown and Code to be captured

    Hello Experts,
    I am using Select options in web dynpro abap.
    On a particular View container i have added a selection field using ADD_SELECTION_FIELD which has an OVS help to it.
    The selection field is of type CODE.
    And on click of a button i am reading the select option fields using GET_RANGE_TABLE_OF_SEL_FIELD and assigining this to a
    field symbol which inturn is being set to an attribute.
    My requirement is to show the TEXT to the user and send the CODE to the method which is called
    when the button is clicked and a table is populated.
    Normally we can keep two attributes one for TEXT and the other for CODE but for Select options i am not very sure how this can be achieved.
    Because in select options we are reading the values present on the select option field and there may be multiple values.
    Please guide me through this.
    Thanks in Advance,
    Shravan

    Hello Shravan,
    This can be easily achieved if you convert the selection field to dropdown.
    Create a valueset containing the list of valid values and then pass this to the ADD_SELECTION_FIELD method
    "Creating valueset
    DATA lt_valueset TYPE wdy_key_value_table.
    DATA ls_valueset LIKE LINE OF lt_valueset.
      ls_valueset-key = 'EN'.
      ls_valueset-value = 'English'.
      APPEND ls_valueset TO lt_valueset.
    "Creating selection field as Dropdown
    lr_helper->add_selection_field( i_id = <ID>
                                                       it_result = lt_range
                                                       i_as_dropdown = abap_true
                                                      it_value_set = lt_valueset ).
    BR, Saravanan

  • Report text element as selection option

    Hi,
      I encounter a performance problem in a report program that include a self define fields in the selection option.  I use the FM READ_TEXT to read those fields and compare with the user input.Then, eliminates those unmatched records with if else statement.
    Here is my code:
    SELECT-OPTIONS: S_WADAT FOR LIKP-WADAT_IST.
      PARAMETERS: P_MAWB LIKE WA_REPORT-KZABE.
      PARAMETERS: P_HAWB LIKE LIKP-BOLNR.
      PARAMETERS: P_MATNR LIKE LIPS-MATNR.
      PARAMETERS: P_LOT(20) TYPE C.
      CLEAR: I_REPORT,I_DELIVERY,I_DELIVERY_INFO.
      REFRESH: I_REPORT,I_DELIVERY,I_DELIVERY_INFO.
      DATA WHERE_TAB(80) OCCURS 10 WITH HEADER LINE.
      DATA: BEGIN OF LTEXT OCCURS 50.
              INCLUDE STRUCTURE TLINE.
      DATA: END OF LTEXT.
      IF NOT P_HAWB IS INITIAL.
        CONCATENATE ' BOLNR = ' WHERE_TAB INTO WHERE_TAB.
        CONCATENATE WHERE_TAB '''' INTO WHERE_TAB.
        CONCATENATE WHERE_TAB P_HAWB INTO WHERE_TAB.
        CONCATENATE  WHERE_TAB '''' INTO WHERE_TAB.
        APPEND WHERE_TAB.
      ENDIF.
      IF NOT P_MATNR IS INITIAL.
        IF NOT WHERE_TAB IS INITIAL.
          CONCATENATE ' AND MATNR = ' WHERE_TAB INTO WHERE_TAB.
        ELSE.
          CONCATENATE ' MATNR = ' WHERE_TAB INTO WHERE_TAB.
        ENDIF.
        CONCATENATE WHERE_TAB '''' INTO WHERE_TAB.
        CONCATENATE WHERE_TAB P_MATNR INTO WHERE_TAB.
        CONCATENATE  WHERE_TAB '''' INTO WHERE_TAB.
        APPEND WHERE_TAB.
      ENDIF.
      SELECT A1~VBELN
             WADAT_IST
             BOLNR
             C1~LIFNR
             B1~MATNR
             LFIMG
             BTGEW
             B1~CHARG
        INTO CORRESPONDING FIELDS OF TABLE TMP_REPORT
        FROM LIKP AS A1 JOIN LIPS AS B1 ON A1~VBELN = B1~VBELN
            JOIN MCHA AS C1 ON B1~MATNR = C1~MATNR
                               AND
                               B1~WERKS = C1~WERKS
                               AND
                               B1~CHARG = C1~CHARG
         WHERE LFART = 'EL'
               AND
               WADAT_IST IN S_WADAT
               AND
               B1~CHARG NE ''
               AND
               B1~WERKS = 'ABC'
               AND
               (WHERE_TAB)
      SORT TMP_REPORT BY VBELN.
      DATA: V_FLAG TYPE I,
            V_EXCLUDE TYPE I,
            V_LOT_EXCLUDE TYPE I.
      V_FLAG = 0.
      V_EXCLUDE = 0.
      V_LOT_EXCLUDE = 0.
      IF SY-SUBRC = 0.
    * trim the parameter space
        SHIFT P_MAWB RIGHT DELETING TRAILING SPACE.
        SHIFT P_MAWB LEFT DELETING LEADING SPACE.
        SHIFT P_LOT RIGHT DELETING TRAILING SPACE.
        SHIFT P_LOT LEFT DELETING LEADING SPACE.
        LOOP AT TMP_REPORT.
          AT NEW VBELN.
            V_FLAG = 1.
            V_EXCLUDE = 0.
          ENDAT.
          IF V_FLAG = 1.
            PERFORM GET_HEADER_TEXT
                  TABLES
                       LTEXT
                  USING
                       'Z3IH'
                        TMP_REPORT-VBELN
            READ TABLE LTEXT INDEX 1.
            SPLIT LTEXT-TDLINE AT ':' INTO
            TMP_REPORT-VERUR TMP_REPORT-VERUR.
            READ TABLE LTEXT INDEX 2.
            SPLIT LTEXT-TDLINE AT ':' INTO
            TMP_REPORT-KZGBE TMP_REPORT-KZGBE.
            READ TABLE LTEXT INDEX 3.
            SPLIT LTEXT-TDLINE AT ':' INTO
            TMP_REPORT-KZABE TMP_REPORT-KZABE.
            READ TABLE LTEXT INDEX 4.
            SPLIT LTEXT-TDLINE AT ':' INTO
            TMP_REPORT-STABE TMP_REPORT-STABE.
            READ TABLE LTEXT INDEX 5.
            SPLIT LTEXT-TDLINE AT ':' INTO
            TMP_REPORT-PRONU TMP_REPORT-PRONU.
            READ TABLE LTEXT INDEX 6.
            SPLIT LTEXT-TDLINE AT ':' INTO
            TMP_REPORT-LADEL TMP_REPORT-LADEL.
            SHIFT TMP_REPORT-KZABE RIGHT DELETING TRAILING SPACE.
            SHIFT TMP_REPORT-KZABE LEFT DELETING LEADING SPACE.
            MOVE-CORRESPONDING TMP_REPORT TO WA_REPORT.
            MOVE-CORRESPONDING TMP_REPORT TO WA_TMPREPORT.
            V_FLAG = 0.
          ELSE.
            MOVE TMP_REPORT-VBELN TO WA_REPORT-VBELN.
            MOVE TMP_REPORT-LIFNR TO WA_REPORT-LIFNR.
            MOVE TMP_REPORT-MATNR TO WA_REPORT-MATNR.
            MOVE TMP_REPORT-LFIMG TO WA_REPORT-LFIMG.
          ENDIF.
          PERFORM GET_LOT_CODE USING
                                     WA_REPORT-MATNR
                                     '3LTU'
                                     WA_TMPREPORT-CHARG
                                     WA_REPORT-LOT.
          IF V_EXCLUDE  1 AND P_MAWB NE ''
            AND WA_TMPREPORT-KZABE NE P_MAWB .
            V_EXCLUDE = 1.
          ENDIF.
          SHIFT WA_REPORT-LOT RIGHT DELETING TRAILING SPACE.
          SHIFT WA_REPORT-LOT LEFT DELETING LEADING SPACE.
          IF P_LOT NE '' AND P_LOT NE WA_REPORT-LOT.
            V_LOT_EXCLUDE = 1.
          ELSE.
            V_LOT_EXCLUDE = 0.
          ENDIF.
          IF V_EXCLUDE  1 AND V_LOT_EXCLUDE  1.
            APPEND WA_REPORT TO I_REPORT.
            CLEAR WA_REPORT.
            CLEAR TMP_REPORT.
          ENDIF.
        ENDLOOP.

    Hi,
    i found one perfromance issue, try to remove the "INTO CORRESPONDING FIELDS OF TABLE " in your select statement, the order of the fields that you are fetching and the oreder for the fields in your internal table structure should be same, then you can remove "INTO CORRESPONDING FIELDS OF TABLE " and while fetching the fields reffer the table and fields you need to fetch here also you need to main the same order...like you have to do the same in where condition.
    Reward if needful.
    Thanks,
    Sreeram.

  • Text for block and select option on the selection screen of Logical Databas

    Hi,
    I have copied a standard program (RFBELJ10) which is making use of LDB (BRF) and created a custom program. Now, the requirement is to add a selection screen option to the custom report and do some validation on the data extracted. I have added the select option and provided a text (lets say "Segment") to it using menu path Goto --> Text Elements --> Selection Texts and activated. But this text is not displayed on the screen when i execute the report. It is showing the string which i used while defining the select option.
    Also i need to provide a frame and title to it. but its not displayed.
    i have written the following code for that:
    SELECTION-SCREEN: BEGIN OF BLOCK seg WITH FRAME TITLE text-h01. " Segment
    SELECT-OPTIONS: s_segmnt FOR faglflexa-segment. " Segment
    SELECTION-SCREEN: END OF BLOCK seg.
    Could you please help me in getting the texts displayed for fram and the select option?
    Thanks,
    Phani

    Solved the problem. I have maintained the text in German. So, when I execute the report in english, it is not displaying the text. I have translated the texts to English and is working fine now.

  • Can I change the select option text for pnp ldb ?

    hi Akll,
    I am using a pnp logical database in my report and I have created my own hr category because i wanted to use field ename from the ldb in the selection screen. Now the problem with ename is I cant do a case sensitive search.
    So I have replaced it with sname, so now my screen has sname instead of ename, however I want to change the selection text for select option ( at present it is 'EE name can be sorted' )
    Kindly advise,
    thanks,
    GV

    I guess the text cannot be changed.. anyways you can add the field as an additional field by normal coding in your report

  • How to write text name of parameters / select options in  ABAP list??

    Hi gurus, i must read the text name of parameterd / select options in ABAP program and write it in a list of the same program for log.......how can i do it??
    Thanks in advance!
    Best regards!
    Ferdinando
    Message was edited by:
            Ferdinando Sellitto

    Hello Ferdinandino
    Useful function modules are:
    RS_PRINT_SELECTIONS
    RS_LIST_SELECTION_TABLE (Generates list according to values in selection table(RSPARAMS))
    RS_REFRESH_FROM_SELECTOPTIONS (Current contents of selection screen)
    Function module RS_REFRESH_FROM_SELECTOPTIONS can provide the input for function module RS_LIST_SELECTION_TABLE.
    Regards
      Uwe

Maybe you are looking for

  • Intall Error - Adobe Acrobat X Pro - Mac OSX (10.8.4) Mountain Lion

    Hi, I cannot install Adobe Acrobat X Pro on my Mac running Mountain Lion. The install file is through my university. The Installer runs like normal but end with the following screen: I can send the lntall log if necessary. I have turned off Gatekeepe

  • Can I store thousands of iPhoto pictures on icloud if I am willing to purchase more space?

    We have several gig of pictures that we would like to keep a backup of in the iCloud so we could access them from any of our iOS devices. We have heard that there are limitations on the number of pictures and possibly the amount of time you could kee

  • How to use SQL*LOADER to read data in |SMITH|ALFRED| format

    the data I need to upload to table using SQL*LOADER is in format as below: |AD |Argentina  | |CN |China       | |US |America            | |GB |England        |so how should I write my control file to read the data into two columns table? I googled an

  • OSB: Performance Testing

    Hi All, I would like to test our OSB Service for Performance. I have already done the test in SOAPUI . But my performance testing requirement is something like this below Request and Response Flow : The consumer sends the requests to Consumer Level O

  • Multiples query before REPFOOTER

    hi, how can i do multiple queries before i print my footer.currently it will repeat printing title and footer for each of the query.Please help. CLEAR COLUMNS CLEAR BREAKS CLEAR COMPUTE COLUMN X_CONTACT_TYPE HEADING 'CONTACT_TYPE' FORMAT A5 SET TERMO