Script & BAPI

Hi friends,
I need a help.
How to find driver programs for standard forms like medruk,Rvorder01 etc.
How to find BAPI function modules for perticular Transaction like vao1, mm01etc.
Regards,
satyam

hi
driver program is linked to the sapscript in the transaction 'NACE'.
The entry coresponding to which is made in table TNAPR.
FOr BAPI, You can use the Trnasaction BAPI.There based on the module in which you are working you can navigate and find the business object linked to it.
Than double click on the business class and you can see a screen where method will be written.Click on the Plus adjacent to the method and can see al;l the methods linked to it.On clicking the method a pop up will come then click on the ABAP Tab you can see the the funtion module name.
Reward if helpful
Mohit

Similar Messages

  • Calling SAP script program in BAPI and want to display in html format

    Dear All,
    I am writing bapi and calling sap script program in it.
    I want output in html format pl suggest me
    same coding is working for report giving error in sapscript only.
    types: begin of tt_html,
                 html type w3html,
           end of tt_html.
    data: list_tab type standard table of abaplist.
    SELTAB-SELNAME = 'S_INVNO'.
    SELTAB-KIND = 'S'.
    SELTAB-SIGN = 'I'.
    SELTAB-OPTION = 'EQ'.
    SELTAB-LOW =  INVOICE_NUM1.
    SELTAB-HIGH = INVOICE_NUM2.
    APPEND SELTAB.
    submit ZSDRDINVPNBRPT with selection-table seltab
    exporting list to memory and return.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = MTAB_REPORT_LIST
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
        CALL FUNCTION 'WRITE_LIST'
         EXPORTING
           WRITE_ONLY       = 'X'
          TABLES
            listobject       = MTAB_REPORT_LIST
         EXCEPTIONS
           EMPTY_LIST       = 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.
    CALL FUNCTION 'WWW_LIST_TO_HTML'
           TABLES
                HTML   = MTAB_REPORT_HTML
           EXCEPTIONS
                OTHERS = 1.
    LOOP AT MTAB_REPORT_HTML.
    ENDLOOP.

    For displaying output in html format,
    u can either use BSP ( Business Server Pages)
    or Webdynpro.
    Reward if helpful.

  • Script modification need

    DOCU – WINDOW
    This is the window on the top right side
    1.Document no (hard coded)
    2.Then display the document number for the first document for the current row. Maybe you should check prior to printing if the current row was posted error free   
       and invoke printing only if this is the case. Then get the first(!!!) document number from the error/message log for this row. ZGF_ICO_RECHR_L-DOCFR
    3. Document date (hard coded) it is P_BLDAT on the selection screen, already correct in the form
    4. VAT No (hard coded)
    5. Then display the EU VAT reg.no of that company. This is in table KNA1, where KUNNR = L_ROW-CUSTFR. The field is KNA1-STCEG, if it is empty, try to populate
         KNA1-STCD1.
    6. Order number(Hard coded)
    7. Just concatenate L_ROW-REF + the last number for that reference from the log table ZGF_ICO_RECHR_L (notice this table has not yet been created!!! and also
        the part is missing where we populate that table when posting both documents for a particular row) ZGF_ICO_RECHR_L-REF+NUMBER
    report  ZG00F_.
    Top Include for the data declarations
    class LCL_REF definition deferred.
    include ZG00F_INT_POST_INVOICE_TOP.
    data: G_ALV_TREE         type ref to CL_GUI_ALV_TREE,
          G_CUSTOM_CONTAINER type ref to CL_GUI_CUSTOM_CONTAINER,
          G_TEXT_CONTAINER   type ref to CL_GUI_CUSTOM_CONTAINER,
          G_LOGGER           type ref to CL_GUI_TEXTEDIT,
          G_TOOLBAR          type ref to CL_GUI_TOOLBAR.
    data: " gt_zgf_ico_rechr      type zgf_ico_rechr occurs 0,
                           "Output-Table
          OKCODE like SY-UCOMM.
          CLASS LCL_REF DEFINITION
    class LCL_REF definition.
      public section.
        data : VALID type BOOLEAN,
               CAN type BOOLEAN.
        methods : CONSTRUCTOR
                    importing IM_REF type ZGF_ICO_RECHR,
                  CAN_POST
                    returning VALUE(CAN) type BOOLEAN,
                  IS_VALID
                    returning VALUE(IS_VALID) type BOOLEAN,
                  GET_DIVA  returning VALUE(DIVA) type LVC_S_LAYN,
                  GET_DIVAC returning VALUE(DIVAC) type LVC_S_LACN,
                  FILL_BAPI_TABLES,
                  GET_REF returning VALUE(R_REF) type ZGF_ICO_RECHR-REF,
                  POST_INVOICE,
                  PRINT_INVOICE,
                  GET_ERRORS returning
                  VALUE(R_ERROR_TAB) type ABAPTXT255_TAB,
                  GET_PRDATA returning
                  VALUE(PR_REF) type ZGF_ICO_RECHR.
      private section.
        data: LINE type ABAPTXT255,
              ERROR_TAB type ABAPTXT255_TAB,
              FIELD like LINE.
        methods :  CHECK_VALIDITY.
    endclass.                    "lcl_ref DEFINITION
          CLASS lcl_ref IMPLEMENTATION
    class LCL_REF implementation.
      method GET_ERRORS.
        R_ERROR_TAB = ME->ERROR_TAB.
      endmethod.                    "get_errors
      method IS_VALID.
        IS_VALID = ME->VALID.
      endmethod.                    "is_valid
      method GET_PRDATA.
        PR_REF = L_REF.
      endmethod.                    "is_valid
      method PRINT_INVOICE.
        data: L_KUNNR type KNA1-KUNNR.
        data: L_ROW type ZGF_ICO_RECHR.
        call function 'OPEN_FORM'
         exporting
           APPLICATION                       = 'TX'
        ARCHIVE_INDEX                     =
        ARCHIVE_PARAMS                    =
           DEVICE                            = 'PRINTER'
           DIALOG                            = 'X'
             FORM                              = 'ZGF_INVOICE'
             LANGUAGE                          = SY-LANGU
         OPTIONS                           = is_options
         exceptions
             CANCELED                          = 1
             DEVICE                            = 2
             others                            = 12.
        if SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
        call function 'START_FORM'
         exporting
           ARCHIVE_INDEX          =
           FORM                   = 'ZGF_INVOICE'
           LANGUAGE               = SY-LANGU
         exceptions
           FORM                   = 1
           others                 = 8.
        if SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
        IF L_REF-TOTAL >= 0.
          IV_INVOICE = 'INVOICE  (COMCoE Recharge)'.
        ELSE.
          IV_INVOICE = 'Credit Memo  (COMCoE Recharge)'.
        ENDIF.
        call method ME->GET_PRDATA
          receiving
            PR_REF = L_ROW.
        L_KUNNR = L_ROW-CUSTFR.
        select single RCOMP ADRNR LAND1 ORT01
        into (IV_RCOMP, IV_ADRNR, IV_COMPLAND1, IV_COMPORT01)
        from T001 where BUKRS = L_ROW-CCFR.
        call function 'WRITE_FORM'
          exporting
            WINDOW  = 'INVOICE'
            ELEMENT = 'T3'
          exceptions
            WINDOW  = 1
            ELEMENT = 2.
        IV_DOCDATE = P_BLDAT.
        IV_ORDNU = L_ROW-REF.
        call function 'WRITE_FORM'
          exporting
            WINDOW  = 'DOCU'
            ELEMENT = 'T2'
          exceptions
            WINDOW  = 1
            ELEMENT = 2.
        select single KUNNR STRAS NAME1 LAND1 ORT01 STCEG
        into
        (IV_CUSTNO, IV_CUSTADD, IV_CUSTNAME1, IV_CUSTLAND1, IV_CUSTCITY,
    IV_DOCVAT)
        from KNA1
        where KUNNR = L_KUNNR.
        call function 'WRITE_FORM'
          exporting
            WINDOW  = 'CUST'
            ELEMENT = 'T6'
          exceptions
            WINDOW  = 1
            ELEMENT = 2.
        IV_CUSTNO = L_KUNNR.
        IV_CURR = L_ROW-CURR.
        call function 'WRITE_FORM'
          exporting
            WINDOW  = 'CUSTNO'
            ELEMENT = 'T4'
          exceptions
            WINDOW  = 1
            ELEMENT = 2.
        data: L_VAR(21).
        concatenate P_DATEFR0(4) '/' P_DATEFR4(2) '/' P_DATEFR+6(2)
        '-' P_DATETO0(4) '/' P_DATETO4(2) '/' P_DATETO+6(2)
        into L_VAR.
        IV_PERDAT = L_VAR.
        call function 'WRITE_FORM'
          exporting
            WINDOW  = 'MAIN'
            ELEMENT = 'T1'
          exceptions
            WINDOW  = 1
            ELEMENT = 2.
        call function 'WRITE_FORM'
          exporting
            WINDOW  = 'FOOTER'
            ELEMENT = 'T5'
          exceptions
            WINDOW  = 1
            ELEMENT = 2.
    *CALL FUNCTION 'END_FORM'
    IMPORTING
      RESULT                         =
    EXCEPTIONS
      UNOPENED                       = 1
      BAD_PAGEFORMAT_FOR_PRINT       = 2
      SPOOL_ERROR                    = 3
    CODEPAGE                        = 4
      OTHERS                         = 5.
        call function 'END_FORM'
          exceptions
            UNOPENED = 1.
        if SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
        call function 'CLOSE_FORM'
          exceptions
            others = 6.
        if SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
      endmethod.                    "is_valid
      method GET_REF.
        R_REF = REF.
      endmethod.                    "get_ref
      method CONSTRUCTOR.
        L_REF = IM_REF.
        REF = IM_REF-REF.
        call method ME->CHECK_VALIDITY.
      endmethod.                    "constructor
      method GET_DIVA.
        DIVA-ISFOLDER = ''.
        if VALID <> 'X'.
          DIVA-N_IMAGE = ICON_NEGATIVE.
        else.
          DIVA-N_IMAGE = ICON_POSITIVE.
        endif.
      endmethod.                    "get_diva
      method GET_DIVAC.
        if V_ERROR1 = 'Y' or V_ERROR2 = 'Y'.
          DIVAC-N_IMAGE = ICON_RED_LIGHT.
        elseif V_ERROR1 = 'N' and V_ERROR2 = 'N'.
          DIVAC-N_IMAGE = ICON_GREEN_LIGHT.
        endif.
        DIVAC-U_N_IMAGE = 'X'.
      endmethod.                    "get_divac
      method CAN_POST.
        CAN = 'X'.
        call method ME->FILL_BAPI_TABLES.
      endmethod.                    "can_post
      method CHECK_VALIDITY.
    *Reference field must begin with M, Q, Y or J. Otherwise display an
    *error msg with text symbol TEXT-001 (ZGF_ICO_RECHR validation error –
    *Reference incorrect – rec.x) where x ist the numebr of the incorrect
    *record.
        data:  L_CHAR(1),
               L_REF1 type ZGF_ICO_RECHR-REF,
               L_ERR type OUTTAB_LINE_ERROR,
               L_NUM type N,
               L_KNB1 type KNB1,
               L_TBSL type TBSL,
               L_CSKS type CSKS,
               L_LFB1 type LFB1.
              l_flag(1).
        clear: L_CHAR, L_NUM, VALID.
        VALID = 'X'.
        L_REF1 = L_REF-REF.
        L_CHAR = L_REF1+0(1).
        if not ( L_CHAR = 'M'  or L_CHAR = 'Q'
                 or L_CHAR = 'Y' or L_CHAR = 'J').
         MESSAGE E398(00) WITH TEXT-001 ' ' ' ' ' '.
          clear L_ERR.
          L_ERR = L_REF.
          L_ERR-ERR_MESG = TEXT-001.
          L_ERR-REC_NO = G_CNTR.
          append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
          append L_ERR-ERR_MESG to ERROR_TAB.
          VALID = 'F'.
        endif.
        clear: L_CHAR, L_NUM.
        L_CHAR = L_REF1+1(1).
        L_NUM = L_CHAR.
        if not L_CHAR = '0'.
          if L_NUM = 0.
            clear L_ERR.
            L_ERR = L_REF.
            L_ERR-ERR_MESG = TEXT-001.
            L_ERR-REC_NO = G_CNTR.
            append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
            append L_ERR-ERR_MESG to ERROR_TAB.
            VALID = 'F'.
          endif.
        endif.
        clear: L_CHAR, L_NUM.
        L_CHAR = L_REF1+2(1).
        L_NUM = L_CHAR.
        if not L_CHAR = '0'.
          if L_NUM = 0.
            clear L_ERR.
            L_ERR = L_REF.
            L_ERR-ERR_MESG = TEXT-001.
            L_ERR-REC_NO = G_CNTR.
            append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
            append L_ERR-ERR_MESG to ERROR_TAB.
            VALID = 'F'.
          endif.
        endif.
        clear: L_CHAR, L_NUM.
        L_CHAR = L_REF1+3(1).
        L_NUM = L_CHAR.
        if not L_CHAR = '0'.
          if L_NUM = 0.
            clear L_ERR.
            L_ERR = L_REF.
            L_ERR-ERR_MESG = TEXT-001.
            L_ERR-REC_NO = G_CNTR.
            append L_ERR-ERR_MESG to GT_ZGF_ICO_RECHR_ERRORS.
            VALID = 'F'.
          endif.
        endif.
        if not ( L_REF-FREQ = 'M' or L_REF-FREQ = 'Q' or L_REF-FREQ = 'Y').
          clear L_ERR.
          L_ERR = L_REF.
          L_ERR-ERR_MESG = TEXT-002.
          L_ERR-REC_NO = G_CNTR.
          append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
          append L_ERR-ERR_MESG to ERROR_TAB.
          VALID = 'F'.
        endif.
        if not ( L_REF-CODE = 'A' or L_REF-CODE = 'B' or L_REF-CODE = 'C'
                 or L_REF-CODE = 'D' or L_REF-CODE = 'E'
                 or L_REF-CODE = 'F' ).
          clear L_ERR.
          L_ERR = L_REF.
          L_ERR-ERR_MESG = TEXT-003.
          L_ERR-REC_NO = G_CNTR.
          append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
          append L_ERR-ERR_MESG to ERROR_TAB.
          VALID = 'F'.
        endif.
    *Customer FROM must not be flagged for deletion in KNB1. (KNB1-LOEVM
    *must be space), otherwise error message with TEXT-007. (ZGF_ICO_RECHR
    *validation error – From customer marked for deletion– rec.x) where x
    *ist the number of the incorrect record.
        select single * from KNB1 into L_KNB1
               where KUNNR = L_REF-CUSTFR.
        if SY-SUBRC = 0.
          if not L_KNB1-LOEVM is initial.
            clear L_ERR.
            L_ERR = L_REF.
            L_ERR-ERR_MESG = TEXT-007.
            L_ERR-REC_NO = G_CNTR.
            append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
            append L_ERR-ERR_MESG to ERROR_TAB.
            VALID = 'F'.
          endif.
          if not L_KNB1-SPERR  is initial.
            clear L_ERR.
            L_ERR = L_REF.
            L_ERR-ERR_MESG = TEXT-006.
            L_ERR-REC_NO = G_CNTR.
            append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
            append L_ERR-ERR_MESG to ERROR_TAB.
            VALID = 'F'.
          endif.
        endif.
       select single * from TBSL into L_TBSL
              where BSCHL = L_REF-PKFRD.
       if not L_TBSL-KOART = 'D'.
         clear L_ERR.
         L_ERR = L_REF.
         L_ERR-ERR_MESG = TEXT-008.
         L_ERR-REC_NO = G_CNTR.
         append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
         append L_ERR-ERR_MESG to ERROR_TAB.
         VALID = 'F'.
       endif.
       select single * from TBSL into L_TBSL
              where BSCHL = L_REF-PKFRS.
       if not L_TBSL-KOART = 'S'.
         clear L_ERR.
         L_ERR = L_REF.
         L_ERR-ERR_MESG = TEXT-009.
         L_ERR-REC_NO = G_CNTR.
         append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
         append L_ERR-ERR_MESG to ERROR_TAB.
         VALID = 'F'.
       endif.
       if not L_REF-PLTFR is initial.
         select single * from CSKS into L_CSKS
         where ZZWERKS = L_REF-PKFRS.
         if SY-SUBRC <> 0.
           clear L_ERR.
           L_ERR = L_REF.
           L_ERR-ERR_MESG = TEXT-012.
           L_ERR-REC_NO = G_CNTR.
           append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
           append L_ERR-ERR_MESG to ERROR_TAB.
           VALID = 'F'.
         endif.
       endif.
        select single * from LFB1 into L_LFB1
               where LIFNR = L_REF-CUSTTO.
        if not L_LFB1-LOEVM is initial.
          clear L_ERR.
          L_ERR = L_REF.
          L_ERR-ERR_MESG = TEXT-018.
          L_ERR-REC_NO = G_CNTR.
          append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
          append L_ERR-ERR_MESG to ERROR_TAB.
          VALID = 'F'.
        endif.
        if not LFB1-SPERR is initial.
          clear L_ERR.
          L_ERR = L_REF.
          L_ERR-ERR_MESG = TEXT-019.
          L_ERR-REC_NO = G_CNTR.
          append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
          append L_ERR-ERR_MESG to ERROR_TAB.
          VALID = 'F'.
        endif.
       select single * from TBSL into L_TBSL
              where BSCHL = L_REF-PKTOK.
       if not L_TBSL-KOART = 'K'.
         clear L_ERR.
         L_ERR = L_REF.
         L_ERR-ERR_MESG = TEXT-020.
         L_ERR-REC_NO = G_CNTR.
         append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
         append L_ERR-ERR_MESG to ERROR_TAB.
         VALID = 'F'.
       endif.
       select single * from TBSL into L_TBSL
              where BSCHL = L_REF-PKTOS.
       if not L_TBSL-KOART = 'S'.
         clear L_ERR.
         L_ERR = L_REF.
         L_ERR-ERR_MESG = TEXT-021.
         L_ERR-REC_NO = G_CNTR.
         append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
         append L_ERR-ERR_MESG to ERROR_TAB.
         VALID = 'F'.
       endif.
        if not L_REF-TOTAL > 0.
          clear L_ERR.
          L_ERR = L_REF.
          L_ERR-ERR_MESG = TEXT-017.
          L_ERR-REC_NO = G_CNTR.
          append L_ERR to GT_ZGF_ICO_RECHR_ERRORS.
          append L_ERR-ERR_MESG to ERROR_TAB.
          VALID = 'F'.
        endif.
       return valid.
      endmethod.                    "check_validity
    --- Method Post Invoice Start ---
      method POST_INVOICE.
      endmethod.                    "post_invoice
    --- Method Post Invoice End ---
    --- Method Filling Bapi Tables Start ---
      method FILL_BAPI_TABLES.
    *---- Populating Bapi for Customer
        V_TOTAL = L_REF-TOTAL.
        perform FILL_BAPI_CUSTOMER.
        V_ERROR1 = 'N'.
        V_ERROR2 = 'N'.
        delete IT_ERROR where NODE_ID = L_SELECTED_NODE.
        IS_ERROR-NODE_ID = L_SELECTED_NODE.
        IS_ERROR-ERROR  = SY-ULINE(30).
        append IS_ERROR to IT_ERROR.
        IS_ERROR-NODE_ID = L_SELECTED_NODE.
        IS_ERROR-ERROR  = L_REF-REF.
        append IS_ERROR to IT_ERROR.
        IS_ERROR-NODE_ID = L_SELECTED_NODE.
        IS_ERROR-ERROR  = SY-ULINE(30).
        append IS_ERROR to IT_ERROR.
        IS_ERROR-NODE_ID = L_SELECTED_NODE.
        IS_ERROR-ERROR   = '*** Checking Customer Document ***'.
        append IS_ERROR to IT_ERROR.
        clear IS_ERROR.
    *---- Checking for 1st Document
        call function 'BAPI_ACC_DOCUMENT_CHECK'
          exporting
            DOCUMENTHEADER       = WA_DOCUMENTHEADER
          tables
            ACCOUNTGL            = LT_ACCOUNTGL
            ACCOUNTRECEIVABLE     =
            LT_ACCOUNTRECEIVABLE
            ACCOUNTTAX           = LT_ACCOUNTTAX
            CURRENCYAMOUNT       = LT_CURRENCYAMOUNT
            RETURN               = LT_RETURN.
        loop at LT_RETURN into WA_RETURN.
          if WA_RETURN-TYPE = 'E' or WA_RETURN-TYPE = 'A'.
            V_ERROR1 = 'Y'.
          endif.
          IS_ERROR-NODE_ID = L_SELECTED_NODE.
          concatenate WA_RETURN-TYPE WA_RETURN-MESSAGE into IS_ERROR-ERROR
            separated by '-'.
          append IS_ERROR to IT_ERROR.
        endloop.
    *--- Checking for 2nd Document
        if V_ERROR1 = 'N'.
    *---- Populating Bapi for Vendor
          L_REF-TOTAL = V_TOTAL.
          perform FILL_BAPI_VENDOR.
          IS_ERROR-NODE_ID = L_SELECTED_NODE.
          IS_ERROR-ERROR   = '*** Checking for Vendor Document ***'.
          append IS_ERROR to IT_ERROR.
          clear IS_ERROR.
          call function 'BAPI_ACC_DOCUMENT_CHECK'
            exporting
              DOCUMENTHEADER = WA_DOCUMENTHEADER2
            tables
              ACCOUNTGL      = LT_ACCOUNTGL2
              ACCOUNTPAYABLE = LT_ACCOUNTPAYABLE
              ACCOUNTTAX     = LT_ACCOUNTTAX2
              CURRENCYAMOUNT = LT_CURRENCYAMOUNT2
              RETURN         = LT_RETURN2.
          loop at LT_RETURN2 into WA_RETURN2.
            if WA_RETURN-TYPE = 'E' or WA_RETURN-TYPE = 'A'.
              V_ERROR2 = 'Y'.
            endif.
            IS_ERROR-NODE_ID = L_SELECTED_NODE.
            concatenate WA_RETURN2-TYPE WA_RETURN2-MESSAGE into
             IS_ERROR-ERROR separated by '-'.
            append IS_ERROR to IT_ERROR.
          endloop.
        endif.
    *--- CHECK WHETHER BOTH DOCUMENTS ARE CORRECT OR NOT returned SUCCESS
        if V_ERROR1 = 'N' and V_ERROR2 = 'N'.
    *--- Posting 1st Document - Customer
          IS_ERROR-NODE_ID = L_SELECTED_NODE.
          IS_ERROR-ERROR   = '*** Posting Customer Document ***'.
          append IS_ERROR to IT_ERROR.
          clear IS_ERROR.
          call function 'BAPI_ACC_DOCUMENT_POST'
            exporting
              DOCUMENTHEADER       = WA_DOCUMENTHEADER
            tables
              ACCOUNTGL            = LT_ACCOUNTGL
              ACCOUNTRECEIVABLE     =
              LT_ACCOUNTRECEIVABLE
              ACCOUNTTAX           = LT_ACCOUNTTAX
              CURRENCYAMOUNT       = LT_CURRENCYAMOUNT
              RETURN               = LT_RETURN.
          call function 'BAPI_TRANSACTION_COMMIT'.
          loop at LT_RETURN into WA_RETURN.
            IS_ERROR-NODE_ID = L_SELECTED_NODE.
           concatenate WA_RETURN-TYPE WA_RETURN-MESSAGE into IS_ERROR-ERROR
             separated by '-'.
            append IS_ERROR to IT_ERROR.
          endloop.
    *--- Posting 2nd Document - Vendor
          IS_ERROR-NODE_ID = L_SELECTED_NODE.
          IS_ERROR-ERROR   = '*** Posting Vendor Document ***'.
          append IS_ERROR to IT_ERROR.
          clear IS_ERROR.
          call function 'BAPI_ACC_DOCUMENT_POST'
            exporting
              DOCUMENTHEADER = WA_DOCUMENTHEADER2
            tables
              ACCOUNTGL      = LT_ACCOUNTGL2
              ACCOUNTPAYABLE = LT_ACCOUNTPAYABLE
              ACCOUNTTAX     = LT_ACCOUNTTAX2
              CURRENCYAMOUNT = LT_CURRENCYAMOUNT2
              RETURN         = LT_RETURN2.
          call function 'BAPI_TRANSACTION_COMMIT'.
          loop at LT_RETURN2 into WA_RETURN2.
            IS_ERROR-NODE_ID = L_SELECTED_NODE.
            concatenate WA_RETURN2-TYPE WA_RETURN2-MESSAGE into
             IS_ERROR-ERROR separated by '-'.
            append IS_ERROR to IT_ERROR.
          endloop.
        endif. "if V_ERROR1 = 'N' and V_ERROR2 = 'N'.
    *--- Setting colour of node.
        data:  LO_REF type ref to LCL_REF,
               IS_NODE_LAYOUT type LVC_S_LACN,
               L_NODE_TEXT type LVC_VALUE,
               WA_OREF type TY_REF.
        clear :IS_NODE_LAYOUT,L_NODE_TEXT, WA_OREF, LO_REF.
        create object LO_REF exporting IM_REF = LS_ZGF_ICO_RECHR.
        IS_NODE_LAYOUT = LO_REF->GET_DIVAC( ).
        read table GT_ZGF_ICO_RECHR into L_REF index L_SELECTED_NODE.
        L_NODE_TEXT = L_REF-REF.
        call method G_ALV_TREE->CHANGE_NODE
          exporting
            I_NODE_KEY     = L_SELECTED_NODE
            I_OUTTAB_LINE  = L_REF
            IS_NODE_LAYOUT = IS_NODE_LAYOUT
            I_NODE_TEXT    = L_NODE_TEXT
            I_U_NODE_TEXT  = 'X'
          exceptions
            NODE_NOT_FOUND = 1
            others         = 2.
        call method G_ALV_TREE->FRONTEND_UPDATE.
        call method CL_GUI_CFW=>FLUSH
          exceptions
            CNTL_SYSTEM_ERROR = 1
            CNTL_ERROR        = 2.
      endmethod.                    "fill_int_tables
    endclass.                    "lcl_ref IMPLEMENTATION
          CLASS lcl_event_handler DEFINITION
    class LCL_EVENT_HANDLER definition.
      public section.
        class-methods : ON_NODE_CLICK for event
          NODE_DOUBLE_CLICK of CL_GUI_ALV_TREE
            importing NODE_KEY.
        methods: ON_FUNCTION_SELECTED
                   for event FUNCTION_SELECTED of CL_GUI_TOOLBAR
                     importing FCODE.
    endclass.                    "lcl_event_handler DEFINITION
          CLASS lcl_event_handler IMPLEMENTATION
    class LCL_EVENT_HANDLER implementation.
      method  ON_NODE_CLICK.
      endmethod.                    "on_node_click
      method ON_FUNCTION_SELECTED.
        data: LT_SELECTED_NODES type LVC_T_NKEY,
              L_RC              type C,
              L_CAN             type C,
              L_REC             type I,
              WA_OREF           type TY_REF,
              L_LINE            type SY-TABIX.
    Determine which line is selected
        call method G_ALV_TREE->GET_SELECTED_NODES
          changing
            CT_SELECTED_NODES = LT_SELECTED_NODES.
        call method CL_GUI_CFW=>FLUSH.
    remark: The user can not select more than one node since the
            default value of NODE_SELECTION_MODE is
            cl_gui_column_Tree=>NODE_SEL_MODE_SINGLE (see constructor).
        describe table LT_SELECTED_NODES lines L_REC.
        if L_REC = 0 and FCODE = 'ERROR'.
    *--- Show log for all if nothing is selected then.
          refresh LT_ERRORS.
          clear LT_ERRORS.
          loop at IT_ERROR into IS_ERROR.
            IS_ERRORS-LINE = IS_ERROR-ERROR.
            append IS_ERRORS to LT_ERRORS.
          endloop.
          call method G_LOGGER->SET_TEXT_AS_R3TABLE
            exporting
              TABLE = LT_ERRORS.
        endif.
        loop at  LT_SELECTED_NODES into L_SELECTED_NODE.
          clear : L_REF, WA_OREF.
          L_LINE = SY-TABIX.
          read table GT_OREF into WA_OREF index L_SELECTED_NODE.
          read table GT_ZGF_ICO_RECHR into L_REF index L_SELECTED_NODE.
          if SY-SUBRC = 0.
            case FCODE.
              when 'ERROR'.
                refresh LT_ERRORS.
                clear LT_ERRORS.
                loop at IT_ERROR into IS_ERROR where NODE_ID =
                                                      L_SELECTED_NODE.
                  IS_ERRORS-LINE = IS_ERROR-ERROR.
                  append IS_ERRORS to LT_ERRORS.
                endloop.
                call method G_LOGGER->SET_TEXT_AS_R3TABLE
                  exporting
                    TABLE = LT_ERRORS.
              when 'POST'.
                if L_LINE = 1.
                  if WA_OREF-O_REF->IS_VALID( ) = 'X'.
                    clear L_RC.
                    call function 'POPUP_TO_CONFIRM_STEP'
                      exporting
                        TEXTLINE1      = 'Do you want to post'  "(902)
                        TEXTLINE2      = '?'                    "(903)
                        TITEL          = 'Confirmation'         "(904)
                        CANCEL_DISPLAY = ' '
                      importing
                        ANSWER         = L_RC.
                  else.
                    call function 'POPUP_TO_INFORM'
                      exporting
                        TITEL = 'Select Another Record..'
                        TXT1  = 'Data Wrong,'
                        TXT2  = 'Posting Can Not be Done'.
                  endif.
                else.
                  L_RC = 'J'.
                endif.
                if L_RC eq 'J'.
    *---Post Invoice.
                  if WA_OREF-O_REF->CAN_POST( ) = 'X'.
                    call method WA_OREF-O_REF->POST_INVOICE.
    *---Printing Log.
                    refresh LT_ERRORS.
                    clear LT_ERRORS.
                    loop at IT_ERROR into IS_ERROR.
                      IS_ERRORS-LINE = IS_ERROR-ERROR.
                      append IS_ERRORS to LT_ERRORS.
                    endloop.
                    call method G_LOGGER->SET_TEXT_AS_R3TABLE
                      exporting
                        TABLE = LT_ERRORS.
                  endif.
                endif.
              when 'PRINT'.
                call method WA_OREF-O_REF->PRINT_INVOICE.
            endcase.
          else.
            message I000(0K) with 'Please select a node.'.
          endif.
        endloop.
      endmethod.                    "on_function_selected
    endclass.                    "lcl_event_handler IMPLEMENTATION
    START-OF-SELECTION.
    start-of-selection.
    end-of-selection.
      call screen 100.
    *&      Module  STATUS_0100  OUTPUT
    module STATUS_0100 output.
      set pf-status 'MAIN100'.
      set titlebar 'MAINTITLE'.
      if G_ALV_TREE is initial.
        perform INIT_TREE.
        call method CL_GUI_CFW=>FLUSH
          exceptions
            CNTL_SYSTEM_ERROR = 1
            CNTL_ERROR        = 2.
        if SY-SUBRC ne 0.
         call function 'POPUP_TO_INFORM'
           exporting
             titel = 'Automation Queue failure'(801)
             txt1  = 'Internal error:'(802)
             txt2  = 'A method in the automation queue'(803)
             txt3  = 'caused a failure.'(804).
        endif.
      endif.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Form  init_tree
          text
    -->  p1        text
    <--  p2        text
    form INIT_TREE .
      data: L_TREE_CONTAINER_NAME(30) type C.
    *Reference tree
      L_TREE_CONTAINER_NAME = 'ZCONTAINER'.
      create object G_CUSTOM_CONTAINER
         exporting
               CONTAINER_NAME = L_TREE_CONTAINER_NAME
         exceptions
               CNTL_ERROR                  = 1
               CNTL_SYSTEM_ERROR           = 2
               CREATE_ERROR                = 3
               LIFETIME_ERROR              = 4
               LIFETIME_DYNPRO_DYNPRO_LINK = 5.
      if SY-SUBRC <> 0.
       MESSAGE x208(00) WITH 'ERROR'(100).
      endif.
    create tree control
      create object G_ALV_TREE
        exporting
            PARENT              = G_CUSTOM_CONTAINER
            NODE_SELECTION_MODE = CL_GUI_COLUMN_TREE=>NODE_SEL_MODE_MULTIPLE
           NODE_SELECTION_MODE = CL_GUI_COLUMN_TREE=>NODE_SEL_MODE_SINGLE
            ITEM_SELECTION      = 'X'
            NO_HTML_HEADER      = ''
            NO_TOOLBAR          = ''
        exceptions
            CNTL_ERROR                   = 1
            CNTL_SYSTEM_ERROR            = 2
            CREATE_ERROR                 = 3
            LIFETIME_ERROR               = 4
            ILLEGAL_NODE_SELECTION_MODE  = 5
            FAILED                       = 6
            ILLEGAL_COLUMN_NAME          = 7.
      if SY-SUBRC <> 0.
        message X208(00) with 'ERROR'.                          "#EC NOTEXT
      endif.
    ****logger
      L_TREE_CONTAINER_NAME = 'ZLOGGER'.
      create object G_TEXT_CONTAINER
         exporting
               CONTAINER_NAME = L_TREE_CONTAINER_NAME
         exceptions
               CNTL_ERROR                  = 1
               CNTL_SYSTEM_ERROR           = 2
               CREATE_ERROR                = 3
               LIFETIME_ERROR              = 4
               LIFETIME_DYNPRO_DYNPRO_LINK = 5.
      create object G_LOGGER
          exporting PARENT = G_TEXT_CONTAINER
          NAME = 'Error Log'.
      call method G_LOGGER->SET_READONLY_MODE.
    endlogger
      data L_HIERARCHY_HEADER type TREEV_HHDR.
      data: LT_LIST_COMMENTARY type SLIS_T_LISTHEADER,
            L_LOGO             type SDYDO_VALUE.
      data : WA_FIELDCATALOG type LVC_S_FCAT.
      perform BUILD_HIERARCHY_HEADER changing L_HIERARCHY_HEADER.
      perform BUILD_COMMENT using LT_LIST_COMMENTARY
                                  L_LOGO.
      clear : WA_FIELDCATALOG, GT_FIELDCATALOG.
    get fieldcatalog
      call function 'LVC_FIELDCATALOG_MERGE'
        exporting
          I_STRUCTURE_NAME = 'ZGF_ICO_RECHR'
        changing
          CT_FIELDCAT      = GT_FIELDCATALOG.
      loop at GT_FIELDCATALOG into WA_FIELDCATALOG.
        case WA_FIELDCATALOG-FIELDNAME.
          when 'REF'.
            WA_FIELDCATALOG-NO_OUT = 'X'.
        endcase.
        WA_FIELDCATALOG-OUTPUTLEN = 15.
        modify GT_FIELDCATALOG from WA_FIELDCATALOG.
      endloop.
      call method G_ALV_TREE->SET_TABLE_FOR_FIRST_DISPLAY
        exporting
          IT_LIST_COMMENTARY  = LT_LIST_COMMENTARY
          I_LOGO              = L_LOGO
         i_structure_name    = 'ZGF_ICO_RECHR'
          IS_HIERARCHY_HEADER = L_HIERARCHY_HEADER
        changing
          IT_FIELDCATALOG     = GT_FIELDCATALOG
          IT_OUTTAB           = GT_ZGF_ICO_RECHR. "table must be empty !
      perform CREATE_HIERARCHY.
      perform CHANGE_TOOLBAR.
      perform REGISTER_EVENTS.
      call method G_ALV_TREE->FRONTEND_UPDATE.
    endform.                    " init_tree
    *&      Form  build_hierarchy_header
    form BUILD_HIERARCHY_HEADER  changing
            P_HIERARCHY_HEADER type TREEV_HHDR.
      P_HIERARCHY_HEADER-HEADING = 'Reference Number'(300).
      P_HIERARCHY_HEADER-TOOLTIP = 'Reference numbers for invoices'(400).
      P_HIERARCHY_HEADER-WIDTH = 30.
      P_HIERARCHY_HEADER-WIDTH_PIX = ' '.
    endform.                    " build_hierarchy_header
    *&      Form  create_hierarchy
    form CREATE_HIERARCHY .
      clear : LS_ZGF_ICO_RECHR, L_LAST_KEY.
    §4a. Select data
      refresh GT_ZGF_ICO_RECHR.
      select * from ZGF_ICO_RECHR into table LT_ZGF_ICO_RECHR
       where FREQ in SO_FREQ
         and  REF in SO_REF.
      sort LT_ZGF_ICO_RECHR by REF.
    Note: The top level nodes do not correspond to a field of the
    output table. Instead we use data of the table to invent another
    hierarchy level above the levels that can be build by sorting.
    §4c. Add data to tree
      G_CNTR = 1.
    sort by oref->get_diva->image .
      loop at LT_ZGF_ICO_RECHR into LS_ZGF_ICO_RECHR.
        perform ADD_COMPLETE_LINE using  LS_ZGF_ICO_RECHR
                                          changing L_LAST_KEY.
        G_CNTR = G_CNTR + 1.
    perform add_node using ls_zgf_ico_rechr-ref
                      changing l_last_key.
      endloop.
    endform.                    " create_hierarchy
    *&      Module  USER_COMMAND_0100  INPUT
    module USER_COMMAND_0100 input.
      SAVE_OK = OKCODE.
      clear OKCODE.
      case SAVE_OK.
        when 'EXIT' or 'BACK' or 'CANC'.
          perform EXIT_PROGRAM.
        when others.
    §6. Call dispatch to process toolbar functions
          call method CL_GUI_CFW=>DISPATCH.
      endcase.
      call method CL_GUI_CFW=>FLUSH.
    endmodule.                 " USER_COMMAND_0100  INPUT
    *&      Form  exit_program
          text
    form EXIT_PROGRAM .
      call method G_CUSTOM_CONTAINER->FREE.
      leave to screen 0.
    endform.                    " exit_program
    *&      Form  add_complete_line
    form ADD_COMPLETE_LINE  using    P_LS_ZGF_ICO_RECHR type ZGF_ICO_RECHR
                                     P_RELAT_KEY type LVC_NKEY
                            changing P_NODE_KEY type LVC_NKEY.
      data: L_NODE_TEXT type LVC_VALUE,
            LO_REF type ref to LCL_REF,
            L_NODE_LAYOUT type LVC_S_LAYN.
    add leaf:
    ALV Tree firstly inserts this node as a leaf if you do not provide
    IS_NODE_LAYOUT with field ISFOLDER set.
    Since these nodes will never get children they stay leaves
    (as intended).
      clear L_NODE_LAYOUT.
      create object LO_REF exporting IM_REF = P_LS_ZGF_ICO_RECHR.
      data : WA_OREF type TY_REF.
      clear WA_OREF.
      WA_OREF-O_REF = LO_REF.
      append WA_OREF to GT_OREF.
      L_NODE_LAYOUT = LO_REF->GET_DIVA( ).
      L_NODE_TEXT = P_LS_ZGF_ICO_RECHR-REF.
      call method G_ALV_TREE->ADD_NODE
        exporting
          I_RELAT_NODE_KEY = P_RELAT_KEY
          I_RELATIONSHIP   = CL_GUI_COLUMN_TREE=>RELAT_LAST_CHILD
          IS_OUTTAB_LINE   = P_LS_ZGF_ICO_RECHR   "_REF
          I_NODE_TEXT      = L_NODE_TEXT
          IS_NODE_LAYOUT   = L_NODE_LAYOUT
        importing
          E_NEW_NODE_KEY   = P_NODE_KEY.
    endform.                    " add_complete_line
    *&      Form  add_node
    form ADD_NODE  using    P_REF
                   changing P_NODE_KEY type LVC_NKEY.
      clear L_NODE_LAYOUT.
      L_NODE_LAYOUT-ISFOLDER = ''.
      L_NODE_LAYOUT-N_IMAGE = ICON_POSITIVE.
      L_NODE_TEXT =  'Reference1'. " ps_sflight-carrid.
      call method G_ALV_TREE->ADD_NODE
        exporting
          I_RELAT_NODE_KEY = '' " p_relat_key
          I_RELATIONSHIP   = CL_GUI_COLUMN_TREE=>RELAT_LAST_CHILD
          I_NODE_TEXT      = L_NODE_TEXT
          IS_OUTTAB_LINE   = P_REF
          IS_NODE_LAYOUT   = L_NODE_LAYOUT
        importing
          E_NEW_NODE_KEY   = P_NODE_KEY.
    endform.                    " add_node
    *&      Form  register_events
    form REGISTER_EVENTS .
      data: LT_EVENTS type CNTL_SIMPLE_EVENTS,
            L_EVENT type CNTL_SIMPLE_EVENT,
            L_EVENT_RECEIVER type ref to LCL_EVENT_HANDLER.
      call method G_ALV_TREE->GET_REGISTERED_EVENTS
        importing
          EVENTS = LT_EVENTS.
    *NODE_DOUBLE_CLICK
      clear L_EVENT.
      move CL_GUI_COLUMN_TREE=>EVENTID_NODE_DOUBLE_CLICK to L_EVENT-EVENTID.
      append L_E

    Ok fine that can be acchived by setting the retention policy and by issuing delete obsolete command.That's perfect.If FRA is configured then even delete obsolete command is also not required.
    but i want to keep the last full backup for 15 days and archived logs only for one day.In this case can we set seperate retention policy for full backup and backup of archived logs
    for the time being i just want to modify my present existing OS script to acchive my task and i will conside changing RMAN script later on.Can u provide me the modified OS script so that my work gets finishes succesfully.
    Thank You...

  • SAP Scripting Languages on the SDN Day - Amsterdam

    I would like to give a short summary of what happened on the SDN Day in Amsterdam, the 17-th Oct. 2006.
    After the breakfast Craig Cmehil gave us a welcome to the event and presented the schedule. We started with a power networking session: Four 20-minute Sessions with Six SDNers per Table. As I was sitting at the Scripting Languages table, I would like to share some impressions of the atmosphere there. We talked much about the emmerging SAP Scripting Tool and how much value it will bring to all scripting projects that plan to utilize SAP backend systems. We discussed Gregor Wolf's contest and he was so kind to inform us that his test system is also available inside the SAP corporate network, so all SAP employees now can participate too. Gregor works for Siteco Beleuchtungstechnik GmbH and the award they offer for the contest is a Siteco Vistosa task light. More information about the contest can be found at https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/4588. [original link is broken] [original link is broken] Another key discussion was held with Björn Schotte, the chief editor of PHP Magazine, Germany, presenting also his company Mayflower Gmbh. He shared some visions on business applications of PHP and stated that PHP is definitely enterprise ready.
    Then after a very short pause we started the SDN breakout sessions (3-5 in parallel). I visited the sessions of Gregor Wolf, André Labahn, Björn Schotte and after this I cooperated for the breakout session of Frank Mittag.
    Session 1:
    Connecting Typo3 to R/3 Enterprise via Web Services with Gregor Wolf from Siteco Beleuchtungstechnik GmbH
    Siteco Beleuchtungstechnik GmbH currently implements a customer service centre into it's Typo3 based website. Typo3 is an Open Source Web Content Management system based on the Scripting Language PHP. The application will allow Siteco's customers to directly check price & availability of products from the backend R/3 Enterprise system, quotations, orders and delivery status. The backend connectivity uses Web Services utilise the PEAR SOAP Package.
    Session 2:
    SAP supports Scripting Languages with Andre Labahn from SAP.
    This session will provide you with more insights on how SAP is supporting scripting languages.
    Session 3:
    Scripting Languages PHP and Enterprise Software with Björn Schotte (Chief Editor from PHP Magazine).
    This session showed us a brief history of PHP and PHP in Germany. Some enterprise applications of PHP were discussed. Björn Schotte was the opinion that PHP is definitely enterprise ready and he proved it with an example of a system that his company has created for Siemens.
    Session 4:
    Scripting Languages Tool with Frank Mittag and Vasil Bachvarov (me) from SAP
    SAP will provide a open source tool to the scripting development community that is supporting the access to SAP Backend Systems via RFC/BAPIs and Webservices. See the concept and demo of the tool and discuss this with SAP Development.
    There was a pretty interesting discussion about the tool. Since the time for the last session shrinked with some minutes we had to be very quick, but Frank Mittag did a great job and succeeded to explain the basic concept of the SAP Scripting Tool and show it in action for the tough time constraint.
    There were a lot of questions from the audience but it was already 18:30 and we stopped at this point. There would be a second chance for questions on thursday when Frank had the opportunity to make a more complete and comprehensive walk-through of the project.
    Then we gathered in the meeting hall and Shai Agassi held a speech and made a summary of the event.
    The evening finished in the BoomChicago theater where everybody received a delicious meal, drinks and a great amount of fun with the ChicagoBoom comic crew.
    I would like to thank all people that made this event come true! See you soon in Bangalore.
    Best Regards,
    Vasil Bachvarov
    SAP AG

    I'm be there in Amsterdam as well.  In fact I am leaving the US on Sunday and arriving early Monday morning in Amsterdam. 
    I was planning to do a little site seeing on Monday Afternoon.  If anyone else is arriving a bit early as well, they are welcome to join me.  It is always more fun to site see in groups.  My email address is public in my SDN business card (also not too difficult to figure out ) if anyone is interested in meeting up.

  • Importing internal table data from FM to eCATT test script

    Hi all,
    I am working on Workflow project where by i need to post invoices related to purchase orders sent as scanned imaages. Incase all the data in the incoming invoice(scanned) is correct then i am using BAPI_INCOMING_INVOICE_CREATE to post the invoice.
    But when the data is wrong, i need to give the user MIRO transaction pre-populated with the invoice details so that he manually corrects them(after verification) and posts the invoice.
    I understand MIRO is an ENJOY transaction hence BDC doesn't work properly(i have tried with all kinds of options on recording and the problem comes incase of multiple POs) hence i choose to use eCATT.
    The recording worksfine but my real problem is the PO data (multiple PO details for same invoice) is in table form. In all my previous objects related to eCATT we used to upload the file, hence no problem of importing tables.
    But now as i'll call this test script from a function module which has all the POs in the form of internal table, i need to import this into my test script.
    Please any body tell me how to proceed in this case or please suggest me a better a way to record the MIRO.
    Thank you,
    Lakshmi Narayana.S

    Hello Raj,
    First of all thank you for your inputs.
    Yes, I know about Parking an invoice. even i am using it in some scenarios.
    If everything on the invoice matches with the values in SAP then i am posting it using BAPI invoice_create also.
    But for some scenarios like if the PO on the invoice doesnot match with actual PO then i need to create a work item in the Accounts Payable user's inbox and he will change invoice data manually (after getting confirmation and correction) and post it using MIRO.
    Here i need to pre-populate the MIRO with the invoice data so that he can correct and post it.
    Hence i was trying to write a BDC and as MIRO is an Enjoy transaction i thought writing a BDC is not a good idea (i tried writing BDC but had problems) hence i am using eCATT.
    Hope i am clear about my problem. Any inputs to solve this are welcome.
    Thanks,
    Lakshmi Narayana.S

  • Java Script Error while deploying a Model with Value Help

    Hi,
    I am using EP 7.0 SP 10.
    I am trying to deploy a model which includes the Value Help for an Input field, and i am trying to deploy this model.
    The model compiles successfully, but gives a Java Script Error while deploying the model,
    ! Error on Page
    When Click on this java script error, it shows that ,
    Line:14985
    Char 1: Error
    object does n't support this property or method.
    code
    URL: <serverhost>/VCRes/WebContent/VisualComposer6.0/bin/223334.htm?24102006.1712.
    The Same model works in dev server, and it fails in the production server.
    Thanks and Regards,
    Sekar

    Hi jakob,
    Thankyou for your quick response.
    I did a basic model with the help of a documentation which i got from this forums.I created a iView and from there i used Bapi "BAPI_SALESORDER ".
    I created a Input Form and a outpot form (table view).I tested model and am able to get the output.but when i try to deploy it is giving me the error.
    And i think am not paring any formulas here.
    Please guide me.
    thanks and regrads
    Pradeep.B

  • Create ecatt script for one sales order creation with multiple line items

    Hi ,
    I want to create a ecatt script for one sales order creation with multiple line items. Preferably SAP GUI.
    This selection of data will be from an external file/ variants which will have only one row of data in it.
    Firstly: I have to sort the external file having same PO Numbers in an order.Group them together.
    Second: I have to create sales order for those many line items having same PO Number.
    Best Regard
    Taranum

    Hi Micky
    Firstl you should upload the Line items for a particular sales Order in an Internal table
    and then pass that internal table to your BAPI during your coding corresponding to a particu;lar sales order
    In case of any issues pls revert back
    Reward points if helpful
    Regards
    Hitesh

  • BAPI for Product master

    Hi,
    I am implementing CRM standalone 5.0. Pls suggest me some BAPI name to upload product .
    Response will be rewarded.
    Thanks and Regards,
    Ambrish

    Instead of a BAPI, I would suggest you use CATT scripts to mass upload the products. This wont require any coding and is an easier method. You can find the details on SDN blogs or on help.sap.com.
    Reward if this helps.
    Thanks
    Gaurav

  • Structure of SAP Script.....

    Hi,
           What is the structure of SAP SCRIPT..... If anybody knows help me....
    Thanx in adv,
    Regards,
    <b>SureshKumar.V</b>

    Hi,
    Check the links for info on SAPSCRIPT structures -
    BAPI Tutorial
    Re: Sapscript
    Re: Sapscript
    Re: sapscript: how to align empty fields?
    Re: Addition of new fields to SAP script
    Re: scripts
    Re: scripts
    Regards,
    Amit
    Reward all helpful replies.

  • How to Call Scapscript program in bapi

    Hi All there,
    wanted to call a sap-script program in a bapi 
    my coding is line
    FUNCTION ZBAPI_ZDIPNB.
    ""Local interface:
    *"  EXPORTING
    *"     VALUE(HTML_STRING) TYPE  STRING
    *"  TABLES
    *"      SELTAB STRUCTURE  RSPARAMS
    *"      HTML_REPORT STRUCTURE  W3HTML
    types: begin of tt_html,
    html type W3HTML,
    end of tt_html.
    Data: LIST_TAB type standard table of ABAPLIST.
    Submit ZSDRDINVPNBRPT with SELECTION-TABLE SELTAB
    exporting list to Memory and return.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = list_tab
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
    CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
    EXPORTING
      REPORT_NAME         =
        TEMPLATE_NAME       = 'WEBREPORTING_REPORT'
       CHARSET             = 'utf-8'
      TABLES
        html                = HTML_REPORT
        listobject          = list_tab.
      LISTICONS           =
    FREE MEMORY.
    ENDFUNCTION.
    but include program in this report is not excuting it is not asking for input parameter which I have defined in include preoram
    Answer will definatly rewarded
    Regards
    Shashikant

    well most of the sap-script driver programs are not executable so you will have problem trying to call these.
    normally the enrty-routine is beeing called and the the rest will go its way.
    but be sure to provide the neccesary data especially in the structure NAST.

  • Send value to BAPI and and get value from BAPI on VB 6.0

    Hi All,
    I want to connect SAP and send some values and get some results from BAPI with Visual Basic 6.0
    I connected SAP successfull But I didn't send value to BAPI.
    I want to connect SAP with BAPI_MATERIAL_GET_ALL BAPI and I want to send u2018000000000000980010u2019  parameter. So I want get the result from BAPI.
    Could anyone help me about send and get value BAPI with VB 6.0?
    Thanks in advanced
    captivator
    Edited by: captivator on Dec 10, 2010 4:24 PM

    Hi Dinesh,
    My full code is below.
    I'm getting error when "Set obj = ctlLogon.GetSAPObject("BAPI_MATERIAL_GET_ALL")" code line is working.
    Error : Script error in module line 30:(10091) ActiveX Automation:no such property or method
    Have you got any idea?
    Thanks in advanced.
    Esat
         Set ctlLogon = CreateObject("SAP.LogonControl.1")
         Set sapConnection = ctlLogon.NewConnection
         sapConnection.User = "user"
         sapConnection.Client = "120"
         sapConnection.Password = "1q2w3e4r"
         sapConnection.ApplicationServer = "xxxxxx"
         sapConnection.Language = "EN"
         sapConnection.SystemNumber = "00"
         booReturn = sapConnection.Logon(0, True)
         If booReturn <> True Then
              gSAPConnect = False
         Else
              gSAPConnect = True
         End If
         If booReturn Then
          'MsgBox "Logged On successfullyu2026"
          Debug.Print"Logged On successfullyu2026"
         End If
    Dim obj As Object
    Dim return As Object
    Set obj = ctlLogon.GetSAPObject("BAPI_MATERIAL_GET_ALL")
    Set return = ctlLogon.DimAs(obj, "000000000000980010", "RETURN")

  • How to process records one by one(not in parallel) with LSMW(BAPI)

    We loaded a batch of records (around 800) in lsmw with biz object method(BAPI).
    The records were processed in parallel and this caused some locking issue.
    Is there any way to make sure the records in LSMW with biz object method(BAPI) are processed one by one to avoid this kind of locking issue.
    Any reply is appreciated.

    Hi,
    I think there must be something to increase the lead time so that locking doesn't happen and it should be either part of customizing or can be coded,not sure exactly what code as in SAP GUI Scripting also there is a way to increase the lead time to avoid the locking issues.
    Regards,
    Rahul

  • Condition verification in java script on Adobe form.

    Hello Experts,
    I am using a interactive forma text element on my view. (java web dynpro)
    It's a simple application. I am trying to figure out how it works with java script.
    I have a text field. which displays employ is sales or production dept
    the values in the data view and its the output element of a BAPI which returns XF,TF,HF and XK,JK,HK
    (record.dept)
    if its XF, TF, HF on the text field in the adobe form should print sales else production.
    I have never used java script on adobe form.
    I figured the strip above the form in adobe designer is used for java script.
    can any one, let me know how I can manipulate.  the record value
    Here is what I am trying record.dept = XF |TF|JF . but i dont know how to run the java script or its syntax.
    Your help is highly appreciated.

    James,
    xfa.host.messageBox should show you an alert dialog box to check data you are getting.
    And yes you are right. You can set the value of textfield using code you mentioned.
    if(record.dept.equalsIgnoreCase("XF")
                 || record.dept.equalsIgnoreCase("TF")
                          record.dept.equalsIgnoreCase("JF"))
       xfa.host.messageBox("The value is Sales");
       <Text-field id>.value = "Sales";
    else
       xfa.host.messageBox("The value is Production");
      <Text-field id>.value = "Production";
    You can even set the texfields to be readOnly, hide some of them etc. But for that I would suggest you going thru the LiveDesigner help. It would solve most of your doubts :-).
    Chintan
    Edited by: Chintan Virani on Feb 19, 2008 3:37 PM

  • Option for running a BAPI outside of SAP

    Hi everyone
    I'd like to call a BAPI from outside of SAP and am interested in what options there are to do this. 
    I believe that Delphi and PHP can be used.  Are there any others?
    Cheers

    You can use a number of languages. The main thing is that you need the RFC library (librfc32.dll on Windows) to communicate with SAP. There are wrappers in Perl, Python, Ruby etc. If you have SAP GUI installed on Windows, you can even write VB scripts to call RFCs in SAP because of the COM-exposed functions.
    (Remember that the term BAPI refers to Business API, which may not always represent a remote-enabled function module. What you want to do is call RFC function modules from outside SAP).
    Google for "SAP RFC <language name>" to see if a specific language has the wrappers/bindings for calling SAP RFC function modules.

  • BAPI to delete the particluar file type DIR.

    Hi all,
    how can I delete single files of a Document Info Record. Only found BAPI to delete the particluar file type DIR.
    I have done using through
    BAPI_DOCUMENT_GETDETAIL2
    BAPI_DOCUMENT_CHANGE2
    Is it possible that we can delete again a file from same document number.
    I tried to delete again document against same document number but could not able to do so.
    Add. INFO:
    The Upload is done in the Document Management System (/cv01-2-3-4n) by a BSP application / BAPI_DOC_CREATE and CHECKIN .
    Thanks in advance,
    Abhishek

    Thanks Niel for the script, unfortunately I am too ignorant about running these on my own, I did save it in my user script library, but I would need instructions to run it. I would be really grateful.
    I did try making up my own workflow using the given actions in Automator, the first action was to 'find specific files in finder' ending with .zip and .rar and then choosing another action which 'moves selected files to trash'. Unfortunately it ended up running only if I specify the path to the specific .zip file, which defeats the purpose. Any suggestions on the proposed workflow? Thanks in advance.

Maybe you are looking for