Syntax error on include of Function Module (user exit)  EXIT_SAPLRSAP_002

When I do a syntax check in the a routine within inlude ZXRSAU02 of FM EXIT_SAPLRSAP_002, I get an error.  This object has been in production so I must be doing the syntax check incorrectly. The error is 'Field i_t_data is unknown. It is neither in one of the specified tatble nor defined by a 'DATA' statement.  This is strange because this field is defined in main body of this user exit.   Please advise the correct way to do syntax check.  
Thank you.

Hi,
The reason for this might be, though it is used in main body- check the main body is not in the routine. Check the field is declared globally, if not try to check the field assigned to what type, & try to re-assign to same one(like your target place where to update the values, continue to Declare& add accordingly.)
- Dileep .C

Similar Messages

  • IPC Pricing with AP 7.00 Database Access/Call function module user-exit

    Hi experts,
    we are running SAP ECO on SAP ECC 6.0 with IPC Pricing AP 7.00 running in the VMC.
    I'm facing a new requirement. In an user-exit for requirements the access to the ABAP database is needed.
    (I know that the SAP recommendation is, don't have access to database. But we need this functionality)
    In ABAP it looks like:
    select single * from  a590
          into     LH_674_a590
          where    kappl  = 'V'
          and      kschl  = 'ZSPR'
          and      kunnr  = komk-kunnr
          and      matnr  = komp-matnr
          and      datbi  >= komk-prsdt
          and      datab  =< komk-prsdt.
    Is there a possibility to implement the same SELECT in the Java-User-Exit?
    Is there maybe the alternative to call a function module instead?
    The database exits on the same application server on which the VMC runs.
    If there is a possiblity can anyone provide me with sample coding or give an advice where to find samle coding?
    I would prefer to call a functions module.
    Thanks in adcance
    Karl-Wilhelm

    Hi Shanto & Sumit,
    Thanks for the inputs.
    as per my understanding of the log
    java.lang.IncompatibleClassChangeError: com.sap.leasing.pricing.tools.LeasingPricingTools: method getPricingConditionByConditionTypeName(Lcom/sap/spe/pricing/transactiondata/userexit/IPricingItemUserExit;Ljava/lang/String;)Lcom/sap/spe/pricing/transa ctiondata/IPricingCondition; used to be stati
    error is thrown by the SAP standard user exit and because of which execution is failing in customer user exits and surprisingly we have not made any changes in both of them.
    this was working earlier before upload.could this be because of the jar packaging.
    how i can download the standard user exit com.sap.leasing.pricing.tools.LeasingPricingTools from crm
    for further investigation.
    Thanks,
    Siddharth

  • Error in copy of function module  FIEB_PASSWORD_ENCRYPT as a Z FM

    Hi Gurus,
    I want to make a copy of function module  FIEB_PASSWORD_ENCRYPT as a Z FM.
    but after coping standard FM when i am trying to activete it ,it is showing one error
    *form decrypt_password does not exist.*
    if possible give me the solution step by step.
    Regards,
    Susheel Joshi

    do something susheel,
    create an empty function group:ZFIEB_PASSWORD.
    Now in the attribute of your ZFM, just add this name (ZFIEB_PASSWORD)in the FUNCTION GROUP section.
    in the main program of this FG-- (ZFIEB_PASSWORD)i, copy the includes given in function group:FIEB_PASSWORD.
    Add these codes:
    *   System-defined Include-files.                                 *
      INCLUDE LFIEB_PASSWORDTOP.                 " Global Data
      INCLUDE LFIEB_PASSWORDUXX.                 " Function Modules
    *   User-defined Include-files (if necessary).                    *
    * INCLUDE LFIEB_PASSWORDF...                 " Subprograms
    * INCLUDE LFIEB_PASSWORDO...                 " PBO-Modules
    * INCLUDE LFIEB_PASSWORDI...                 " PAI-Modules
    INCLUDE LFIEB_PASSWORDF01.
    the intension is to copy all the includes from this pool.
    you should be able to do it now
    ags.n
    Edited by: ags on Oct 30, 2009 3:19 PM

  • Error while activating the function module

    hi,
    am getting error while activating the function module i.e. program or report statement is missing.
    thank you in advance
    karthik

    hii vinu,
    hi there....
    make sure that the Processing type in Attributes tab is 'Normal function module'. Also chk the general data, it must be having some name in the Program Name and include name column.try checking the program names in se38, if the program is of type include or not. you can also chk by writting  a program call the function module and test it
    I hope this will solve the query. in my case, SAPLZ123 is the program name and LZ123U28 is the include name.
    or
    Its common prob with Function module.
    Goto SE80->Give Function group name->Right click on it->Activate.
    regards,
    Shweta

  • Simple Examples on ABAP Objects without using include or function modules

    Hi,
    I am new to ABAP. I need simple example codes on ABAP Objects. It should not have Includes or Function Modules. Just simple codes, using local & global classes, interfaces etc. I searched the forum and even <<the site that shall not be mentioned>>, but did not find a solution. Kindly help please.
    Regards,
    Smruthi.
    Edited by: Matt on Mar 1, 2009 1:20 PM - forbidden site reference removed

    Hello Smruthi
    If you go to the Forum Search and choose the forum ABAP Objects then serach for ZUS_SDN and you will find many of my simple sample reports.
    These reports usually do not contain any includes but they may call function modules which makes perfectly sense. For example, if you are still doing a direct table SELECT instead of using an available BAPI (or class) to get a business object then this is a clear sign of poor (=non-ABAP-OO) programming.
    Regards
      Uwe

  • What are the Includes in Function Module...? if the fuction group IS ZSJ_FC

    What are the Includes in Function Module...? if the fuction group IS ZSJ_FC..?
    How can I access SAP through Internet....?
    Moderator Message: Interview-like question(s). Thread locked.
    Edited by: Suhas Saha on Sep 30, 2011 11:14 AM

    Hi
    No!  U can insert an own you Z-INCLUDE or somethingelse, try to regenerate the index of the program.
    Max

  • Creating Includes for Function Modules

    Hi Experts,
    Can you please let me know how to create includes for function modules.
    I came across this in a standard include program, which was generated by a function library. The includes inside this program where linked to the function modules (when I double clicked on them).
    Please let me know how to create it.
    Thanks in advance !
    Regards,
    Anand Patil.

    Hi,
    have a look at the code for better understanding
    Declaration of Workareas                                             *
      DATA: lwa_e1bp2017_gm_item_create TYPE e1bp2017_gm_item_create,
            lwa_data         TYPE edidd, " Work area for IDOC
            lwa_control      TYPE edidc. " Work Area for control rec
    Read the control data information of idoc.
      loop at idoc_contrl INTO lwa_control Where mestyp = lc_mbgmcr.
    Extract the data from the segments.
        LOOP AT idoc_data INTO lwa_data
        WHERE docnum = lwa_control-docnum and
              segnam = lc_item_create.
    *->> Set the tabix of the internal table
          lv_index = sy-tabix.
    Move the Material Document Item Segment data
          MOVE lwa_data-sdata TO lwa_e1bp2017_gm_item_create.
    Modify the material document item data  internal table
          PERFORM sub_modify_idocdata changing lwa_e1bp2017_gm_item_create.
    *->> set the changed values to the IDOC SDATA
          MOVE  lwa_e1bp2017_gm_item_create TO lwa_data-sdata.
    *->> Modify the table
          MODIFY idoc_data FROM lwa_data index lv_index.
    Clear the Work areas
          CLEAR : lwa_data,
                  lwa_e1bp2017_gm_item_create.
        ENDLOOP.                                     "LOOP AT t_idoc_data
    Call the BAPI function module to create the
    appropriate Material Document
        CALL FUNCTION 'BAPI_IDOC_INPUT1'
          EXPORTING
            input_method          = input_method
            mass_processing       = mass_processing
          IMPORTING
            workflow_result       = workflow_result
            application_variable  = application_variable
            in_update_task        = in_update_task
            call_transaction_done = call_transaction_done
          TABLES
            idoc_contrl           = idoc_contrl
            idoc_data             = idoc_data
            idoc_status           = idoc_status
            return_variables      = return_variables
            serialization_info    = serialization_info
          EXCEPTIONS
            wrong_function_called = 1
            OTHERS                = 2.
        IF sy-subrc = 1.
          RAISE wrong_function_called.
        ENDIF.
      endloop.
    ENDFUNCTION.
    here when we write the statment
    PERFORM sub_modify_idocdata changing lwa_e1bp2017_gm_item_create and double click on sub_modify_idocdata .
    it will create a include with the name "LZDTSINT052F_GPOMS_GMF01 ".
    now we can write the FORM ..END FORM In this inculde.like this.
    ***INCLUDE LZDTSINT052F_GPOMS_GMF01 .
    *&      Form  sub_modify_idocdata
    Modify the material document item data  internal table
    FORM sub_modify_idocdata
    CHANGING pwa_e1bp2017_gm_item_create TYPE e1bp2017_gm_item_create.
    contant declaration
      CONSTANTS: lc_261(3) TYPE c VALUE '261'.
      DATA : lv_aplzl LIKE resb-aplzl,
             lv_aufpl LIKE resb-aufpl,
             lv_subrc LIKE sy-subrc,
             lv_charg LIKE resb-charg,
             lv_uom LIKE pwa_e1bp2017_gm_item_create-entry_uom.
      CLEAR: pwa_e1bp2017_gm_item_create-reserv_no,
             pwa_e1bp2017_gm_item_create-res_item.
    *->> Get SAP storage bin & Storage type from the Z table
      SELECT lgtyp lgpla
        INTO (pwa_e1bp2017_gm_item_create-stge_type,
              pwa_e1bp2017_gm_item_create-stge_bin)
         UP TO 1 ROWS
        FROM zdtsint050_sttyp
         WHERE zstorage_typ = pwa_e1bp2017_gm_item_create-stge_type
          AND  zstorage_bin = pwa_e1bp2017_gm_item_create-stge_bin.
      ENDSELECT.
      IF sy-subrc NE 0.
        CLEAR: pwa_e1bp2017_gm_item_create-stge_type,
               pwa_e1bp2017_gm_item_create-stge_bin.
      ENDIF.
      PERFORM get_oper CHANGING pwa_e1bp2017_gm_item_create.
    Get the Reservation number and Reservation item number
    basing on the idoc data.
      SELECT rspos werks lgort
             INTO (pwa_e1bp2017_gm_item_create-res_item,
                  pwa_e1bp2017_gm_item_create-plant,
                     pwa_e1bp2017_gm_item_create-stge_loc)
             FROM resb
             UP TO 1 ROWS
             WHERE rsnum = pwa_e1bp2017_gm_item_create-reserv_no
             AND   matnr = pwa_e1bp2017_gm_item_create-material
             AND   charg = pwa_e1bp2017_gm_item_create-batch
             AND   aufnr = pwa_e1bp2017_gm_item_create-orderid
             AND   vornr = pwa_e1bp2017_gm_item_create-activity
             AND   bwart = lc_261.
      ENDSELECT.
      IF sy-subrc <> 0.
    Start of insertion for R31K993797
        CLEAR lv_charg.
        SELECT rspos werks lgort
             INTO (pwa_e1bp2017_gm_item_create-res_item,
                  pwa_e1bp2017_gm_item_create-plant,
                     pwa_e1bp2017_gm_item_create-stge_loc)
             FROM resb
             UP TO 1 ROWS
             WHERE rsnum = pwa_e1bp2017_gm_item_create-reserv_no
             AND   matnr = pwa_e1bp2017_gm_item_create-material
             AND   charg = lv_charg
             AND   aufnr = pwa_e1bp2017_gm_item_create-orderid
             AND   vornr = pwa_e1bp2017_gm_item_create-activity
             AND   ( splkz = 'X' or
                     splkz = space )
             AND   bwart = lc_261.
        ENDSELECT.
        IF sy-subrc <> 0.
    End of insertion for R31K993797
          SELECT SINGLE werks lgort
                INTO (pwa_e1bp2017_gm_item_create-plant,
                       pwa_e1bp2017_gm_item_create-stge_loc)
                FROM resb
                WHERE rsnum = pwa_e1bp2017_gm_item_create-reserv_no.
          CLEAR : pwa_e1bp2017_gm_item_create-reserv_no,
                  pwa_e1bp2017_gm_item_create-res_item.
        ENDIF.
      ENDIF.
    get SAP UOM
      SELECT SINGLE zsap_uom
                    INTO lv_uom
                    FROM zca_uom_conv
                    WHERE zext_uom = pwa_e1bp2017_gm_item_create-entry_uom.
      IF sy-subrc = 0.
        pwa_e1bp2017_gm_item_create-entry_uom = lv_uom.
      ENDIF.
    ENDFORM.                    " sub_modify_idocdata
    *&      Form  get_oper
         Get the operation
         <--P_PWA_E1BP2017_GM_ITEM_CREATE_RE  Segment
    FORM get_oper  CHANGING p_pwa_e1bp2017_gm_item_create TYPE
                   e1bp2017_gm_item_create.
      DATA : l_aufpl LIKE afko-aufpl,
             l_aplzl LIKE afvc-aplzl.
      REFRESH : i_op.
      UNPACK p_pwa_e1bp2017_gm_item_create-orderid TO
             p_pwa_e1bp2017_gm_item_create-orderid.
    Get the reservation and routing number for the order
      SELECT SINGLE
             rsnum
             aufpl
             FROM afko
             INTO (p_pwa_e1bp2017_gm_item_create-reserv_no,
                   l_aufpl)
             WHERE aufnr = p_pwa_e1bp2017_gm_item_create-orderid.
      IF sy-subrc = 0.
        CALL FUNCTION 'CONVERSION_EXIT_NUMCV_INPUT'
          EXPORTING
            input  = p_pwa_e1bp2017_gm_item_create-activity
          IMPORTING
            output = p_pwa_e1bp2017_gm_item_create-activity.
      ENDIF.
    ENDFORM.                    " get_oper
    Regards,
    nagaraj

  • Error for customer specific Authorization check (User Exit)

    Dear Experts,
    I am facing a problem in PM.
    I have created a maintenace plan for calibration via t code IP42 and mentioned the order type PM05. Scheduling is done for the order. I got the order number.
    I have released the order and got the inspection lot number.
    While entering the results recording through t code QE17, the reluts are out of the specified range, i have given the valuation Rejected, immediately system is giving an error message as below:
    "Error for customer specific Authorization check (User Exit)"
    Though there is no user exit activated in the system, this message is coming and not allowing the result recoring for rejection.
    If I'm entering the result recording within the specified range, then valuation is Accepted and its allowing to save.
    I have checked the following user exits:
    QQMA0002: QM: Authorization Check for Entry into Notif. Transaction
    QQMA0026: PM/SM: Auth. check when accessing notification transaction.
    The above 2 User Exits are not active.
    I have also checked a note 429066. But it says incase of any dump for that user exit only its applicable and more over the current version of the system is ECC 6.0 packae 15, where as that note is applicable upto 4.6C.
    Please some one help me on this issue.
    Thanks and Regards,
    Praveen.

    Dear Pete,
    I have cheked with my technical team, There is no hotpacks updated recently. This is the implementaion project I'm in, so performing the cycle for the first time.
    Any how I got it solved, in T code QE17, after entering the Inspection lot in next screen goto menu path Settings - User settings - Defects recording mention the reprt type and tick on Reprt type Changable.
    At the time of result recording if the valuation is Rejected then it ask for defects recording close that window if not rwequired then save, the error message no longer apperaing now.
    Regards,
    Praveen

  • Syntax Error in Include which is genarated by System

    Hi,
    Good day experts,
    now iam working on EVENTS in IS-U module.
    FUNCTION Module : yfkk_sample_9560 .
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(I_FKKOP) TYPE  FKKOP
    *"     REFERENCE(I_FIELDCAT) TYPE  FKKSP_FIELDS
    *"     REFERENCE(I_KEYDATE) TYPE  OP_KEYDATE_KK OPTIONAL
    *"  CHANGING
    *"     REFERENCE(C_FKKOPRU) TYPE  FKKOPRU
    *types:fkksp_fields type table of fkksp_s_fields.
    Example:
    DATA:
       wa_cat TYPE fkksp_s_fields.
    READ TABLE i_fieldcat INTO wa_cat
       WITH KEY orig_field = 'PARTNER_NAME' orig_table = 'FKKOPRU'.
    IF sy-subrc = 0.
       SELECT SINGLE field
         INTO c_fkkopru-partner_name
         FROM table
         WHERE gpart = i_fkkop-gpart.
    ENDIF.
    GETTING CITY1  ********************
       DATA:
            wa_cat type fkksp_s_fields. "#EC *
       DATA: wa_fkkop TYPE fkkop. "#EC *
       DATA: x_haus LIKE ehauisu-haus, "#EC *
             x_actual LIKE regen-actual. "#EC *
       DATA:lv_vkonto TYPE ever-vkonto. "#EC *
       TABLES: ever,eanl,evbs. "#EC *
       DATA: lv_anlage TYPE eanl-anlage, "#EC *
             lv_vstelle TYPE eanl-vstelle. "#EC *
       DATA: yv_vstelle TYPE evbs-vstelle, "#EC *
             lv_haus    TYPE evbs-haus, "#EC *
             yy_addr_data TYPE eadrdat, "#EC *
             y_ehauisu TYPE ehauisu, "#EC *
             x_portion TYPE te420-termschl, "#EC *
             lv_vkont TYPE fkkvkp-vkont. "#EC *
       DATA: t_ever LIKE ever OCCURS 0 WITH HEADER LINE, "#EC *
             t_eanl LIKE eanl OCCURS 0 WITH HEADER LINE, "#EC *
             t_evbs LIKE evbs OCCURS 0 WITH HEADER LINE, "#EC *
             t_iflot LIKE iflot OCCURS 0 WITH HEADER LINE. "#EC *
      DATA: y_anlage TYPE eablg-anlage, "#EC *
            y_ableinh TYPE eablg-ableinh, "#EC *
            y_portion TYPE te422-portion. "#EC *
    ****Getting the city 1 *******************
    *LOOP AT I_FKKOP INTO WA_FKKOP.
       CALL FUNCTION 'ISU_GET_PARTNER_ADDRESS'
         EXPORTING
           x_partnerid        = i_fkkop-gpart
           x_addrnumber       = i_fkkop-emadr
      X_PERSNUMBER       =
        IMPORTING
      Y_NAME             =
      Y_ADDR_LINES       =
          y_addr_data        = yy_addr_data .
    *******Getting the connection object**************
       CALL FUNCTION 'YISU_GETCONNOBJ_VKONTGPART'
         EXPORTING
           i_vkont        = i_fkkop-vkont
           i_gpart        = i_fkkop-gpart
      IMPORTING
        E_BUTOOO       =
        E_FKKVKP       =
         TABLES
           t_ever         = t_ever
           t_eanl         = t_eanl
           t_evbs         = t_evbs
           t_iflot        = t_iflot
       lv_haus = t_evbs-haus.
    Getting the Political Word***************
       CALL FUNCTION 'ISU_DB_EHAUISU_SINGLE'   "#EC *
         EXPORTING
           x_haus          = lv_haus
          X_ACTUAL        = ' '
        IMPORTING
          y_ehauisu       = y_ehauisu
      EXCEPTIONS
       not_found       = 1
       OTHERS          = 2.
       IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    ***********Getting the Potion******************
       SELECT SINGLE anlage "#EC *
                     ableinh FROM eablg INTO (y_anlage, y_ableinh) WHERE anlage = t_eanl-anlage.
       IF sy-subrc = 0.
         SELECT SINGLE portion FROM te422 INTO y_portion WHERE termschl = y_ableinh.
       ENDIF.
    ***************Assinging the city1 and political word and portion ***********
       READ TABLE i_fieldcat INTO wa_cat WITH KEY
           orig_field = 'YYCITY1'    orig_table = 'FKKOPRU'
           orig_field = 'YYREGPOLIT' orig_table = 'FKKOPRU'
           orig_field = 'YYPORTION'  orig_table = 'FKKOPRU'.
       IF sy-subrc = 0.
         c_fkkopru-yycity1 = yy_addr_data-city1.
         c_fkkopru-yyregpolit = y_ehauisu-regpolit.
         c_fkkopru-yyportion = y_portion.
       ENDIF.
    ENDFUNCTION.
    Here iam getting the syntax error but activation wont get any error.
    Error is : "FKKSP_FIELDS" is not a pre-defined type or a type from a type group.          
    Plz its very urgent. give me solution for this Error.
    Regards,
    kk

    Hi,
    You need to declare the type group FKKSP in the global include.  i.e.
    TYPE-POOLS FKKSP.
    Regards,
    Dion

  • Unknown error calling a RFC Function Module in BODI

    Hi all,
    I am having an issue identifying the error that my batch job in BODI is giving with regards to a RFC function module call in my query. The value returned by the standard parameter 'AL_RFC_RETCODE' are square characters (              ).
    At the completion of the job, the error message 'RFC CallReceive error <Function ZCT_INDSLS_SLS_TRN_INSERT: Invalid request.. Invalid request.>.' is being output.
    Correct me if I'm wrong but the parameter 'AL_RFC_RETCODE' should return standard values as per the techical manual provided to undertand any errors that might occur during a RFC FM call.
    Can anyone help me on this?
    Best regards,
    Andrew Wong

    Hi Senthil,
    I think you answered your query in your question itself
    The user ID and password need to be maintained in RFC destination in SM59.
    Go to SM59 and then click on test connection..if it does not ask for ID and passwoed that means correct ID and password is maintained in SM59 otherwise maintain it.
    Regards,
    Atish

  • Syntax check for tables and function modules

    Hi,
    I am writing a program that perform syntax check on object such as executable programs , function modules and tables.
    Syntax check works fine for programs, but not for tables.
    How can I perform syntax check on my tables or structures?
    I get my data from the table TADIR. But I don't get my function modules from there. What is the table for this.
    Thanks 4 ur replies.
    Parvez

    hi
    good
    generally in sap while creating a table or structure we get the error and we solved them,but like reports during runtime it is not possible to check the syntax of a table or structure.
    thanks
    mrutyun^

  • Calling WebDynpro input screen from within an abap Function module / user

    Hi,
    I am posting SAP data with a BAPI from an Web Dynpro Application.
    In the Bapi I must use an BADI/User -EXIT to add some infornation.
    Today this is done by calling an Dynpro in a function module. This creates a pop up, data is filled and posted on commit.
    How can I get a Web Dynpro application to display this popup without showing the "call screen without connection " error ?
    Thanks for any help.
    Marcus

    >
    Deok-Byung Lim wrote:
    > Here is an unofficial way to get current WD component.
    > (WDR_TASK class is not for customer)
    >
    >   DATA lo_wdr_component TYPE REF TO cl_wdr_component.
    >   lo_wdr_component = wdr_task=>application->component.
    >
    >
    > then.. attach component usage and popup your WD screen
    >
    > BUT IT'S NOT OFFICIAL!!
    This approach is absolutely NOT supported nor recommended by SAP.

  • Syntax error on INCLUDE STRUCTURE.

    Hi Experts,
    It is abit hard to explain what I need here.
    But I try to explain as much as I can.
    I am writing this code in order to update the customer material numbers into internal table tvbdpa. As you can see in my code, getting the customer material numbers require mapping the position number.
    I am stuck at the LOOP below with ***.
    Also getting the syntax error
    _The declaration for the key field "KDMAT" is imcomplete.
    However "KDMAT" is is contained in the key of table "TVBDPA" and must be filled._
    TABLES: vbco3.
    DATA: da_mess LIKE vbfs OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF tvbdpa OCCURS 0,        "Internal table for items
            kdmat LIKE LIPS-KDMAT.
            INCLUDE STRUCTURE vbdpa.
    DATA: END OF tvbdpa.
    DATA: itab_vbak TYPE SORTED TABLE OF vbak
             WITH UNIQUE KEY vbeln,
          wa_vbak  LIKE LINE OF itab_vbak,
          itab_lips TYPE SORTED TABLE OF lips
             WITH UNIQUE KEY vbeln,
          wa_lips   LIKE LINE OF itab_lips,
          wa_tvbdpa LIKE LINE OF tvbdpa,
          lv_zuonr  TYPE vbak-zuonr.
      vbco3-mandt = sy-mandt.
      vbco3-spras = nast-spras.
      vbco3-vbeln = nast-objky.
      vbco3-kunde = nast-parnr.
      vbco3-parvw = nast-parvw.
    CALL FUNCTION 'RV_DOCUMENT_PRINT_VIEW'
      EXPORTING
        comwa                       = vbco3
      IMPORTING
        kopf                        = vbdka
      TABLES
        pos                         = tvbdpa
        mess                        = da_mess
      EXCEPTIONS
        fehler_bei_datenbeschaffung = 1.
    IF NOT tvbdpa[] IS INITIAL.
      SELECT SINGLE zuonr FROM vbak
        INTO lv_zuonr
        WHERE vbeln = vbdka-vbeln.
        IF sy-subrc = 0 AND lv_zuonr <> ''.
          SELECT vbeln posnr kdmat FROM lips
            INTO CORRESPONDING FIELDS OF TABLE itab_lips
            WHERE vbeln = lv_zuonr.
    ***I am stuck at here.
          LOOP AT itab_lips INTO wa_lips.
            READ TABLE tvbdpa INTO wa_tvbdpa
              WITH TABLE KEY posnr = wa_lips-posnr.
            wa_tvbdpa-kdmat = wa_lips-kdmat.
            MODIFY TABLE tvbdpa FROM wa_tvbdpa
                   TRANSPORTING kdmat.
          ENDLOOP.
    ***end I am stuck at here.
        ENDIF.
    ENDIF.
    All advise are welcome and greatly appreciated.
    Thanks in advance.

    Hi Subramanian,
    Does this more make sense for you?
    Can I read the table like :-
            READ TABLE itab_lips INTO wa_lips
              WITH TABLE KEY VBELN = wa_tvbdpa-matnr." AND POSNR = wa_tvbdpa-posnr.
    TABLES: vbco3.
    DATA: da_mess LIKE vbfs OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF tvbdpa OCCURS 0,        "Internal table for items
            kdmat LIKE LIPS-KDMAT.
            INCLUDE STRUCTURE vbdpa.
    DATA: END OF tvbdpa.
    DATA: itab_vbak TYPE SORTED TABLE OF vbak
             WITH UNIQUE KEY vbeln,
          wa_vbak  LIKE LINE OF itab_vbak,
          itab_lips TYPE SORTED TABLE OF lips
             WITH UNIQUE KEY vbeln,
          wa_lips   LIKE LINE OF itab_lips,
          wa_tvbdpa LIKE LINE OF tvbdpa,
          lv_zuonr  TYPE vbak-zuonr.
      vbco3-mandt = sy-mandt.
      vbco3-spras = nast-spras.
      vbco3-vbeln = nast-objky.
      vbco3-kunde = nast-parnr.
      vbco3-parvw = nast-parvw.
    CALL FUNCTION 'RV_DOCUMENT_PRINT_VIEW'
      EXPORTING
        comwa                       = vbco3
      IMPORTING
        kopf                        = vbdka
      TABLES
        pos                         = tvbdpa
        mess                        = da_mess
      EXCEPTIONS
        fehler_bei_datenbeschaffung = 1.
    IF NOT tvbdpa[] IS INITIAL.
      SELECT SINGLE zuonr FROM vbak
        INTO lv_zuonr
        WHERE vbeln = vbdka-vbeln.
        IF sy-subrc = 0 AND lv_zuonr <> ''.
          SELECT vbeln posnr kdmat FROM lips
            INTO CORRESPONDING FIELDS OF TABLE itab_lips
            WHERE vbeln = lv_zuonr.
          LOOP AT tvbdpa INTO wa_tvbdpa.
            READ TABLE itab_lips INTO wa_lips
              WITH TABLE KEY VBELN = wa_tvbdpa-matnr." AND POSNR = wa_tvbdpa-posnr.
            wa_tvbdpa-kdmat = wa_lips-kdmat.
            MODIFY TABLE tvbdpa FROM wa_tvbdpa
                   TRANSPORTING kdmat.
          ENDLOOP.
        ENDIF.
    ENDIF.

  • Error while copy the function module

    Hi,
    When am copying the some standard FM into my z function module and when am checking the syntex error it throwing the error "REPORT/PROGRAM statement missing, or program type is I (INCLUDE).".
    Can you suggest.

    Hi All,
    Thanks for your help.
    Finally i did by my own.
    the problem is we need to activate their mail program and all include which we can see in goto>main program.
    Amit.

  • Error when using CONVERT_OTF function module

    Dear Friends,
    In many of our reports we are using the function module CONVERT_OTF to send the output as a mail the users.
    But after the latest patch update we have came across a new problem. Mail is getting triggered and we can also see the icon or
    the file in mail. But when we are opening the file we are getting the message that "THERE WAS AN ERROR OPENING THIS
    DOCUMENT. THE FILE IS DAMAGED AND COULD NOT BE REPAIRED.
    Earlier this program has been working fine from last 2 years but after updating the patch in the of August 2009. This problem we are
    facing. All our mails are not working.
    Thanks
    Vamshi
    Edited by: Rob Burbank on Sep 7, 2009 3:12 PM

    Dear Clemens,
    Thank you for the immediate response. I have checked the program in Debug Mode. When we are passing the data to the CONVERT_OTF the output table of the function module is showing the data in some Unicode format in the tables OTF and LINES.
    Out of the FM is in completely special characters and this is after updating the latest patch.
    We are using Release 700 Level 19 and Service Package SAPKA70019.
    Thanks and Regards
    Vamshi Sreerangam
    Edited by: vamshi sreerangam on Sep 8, 2009 5:54 AM

Maybe you are looking for