Bapi FM upload program

Hi All,
I am doing bapi fm upload program, when i run the program it shows the short dump error,
i debug this program, the cursor is not move after tansaction_commit,
it shows the FM: ps_commit. it s not run successfully,
any one help for this error,
(  CALL FUNCTION 'BAPI_PS_PRECOMMIT'                                                                " CALL FUNCTION MODULE
              TABLES
                   ET_RETURN       = lt_ret2.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'                                                          " CALL FUNCTION MODULE
               EXPORTING
                  WAIT          = 'X'.)
Thanks for advance help.
Amudha

Hi,
You can delete a project definition using the BAPI "BAPI_BUS2001_DELETE". You must enter the name of the project definition that is to be deleted in "I_PROJECT_DEFINITION". Before the project definition is deleted, the following is checked:
the project definition is deleted in the document tables. If the project has WBS elements, these are also deleted. If the project has other objects such as networks, activities and so on, the BAPI terminates and an error message is displayed. These must be deleted beforehand. The BAPI does not delete these automatically. The project definition is deleted as soon as a LUW (Logical Unit of Work) has been completed with the BAPI BAPI_PS_PRECOMMIT and COMMIT WORK. Only one project or one WBS element from a project can be processed at a time in one LUW. You cannot delete temporary objects. This means that if you create a project in an LUW, you cannot delete it immediately after creating it. You can delete it using this BAPI only after you physically create the project using the BAPIs "BAPI_PS_PRECOMMIT" and "COMMIT WORK".
REgards,
Nandha

Similar Messages

  • Lsmw vs upload program

    Can any one tell me which is better to use. I have 18 million of records which i need to upload into CRM system. So which is better to use whether i should use lsmw (if yes then which method IDOC or BAPI) or upload program.

    Hello Rakesh,
    If I were you i would go with LSMW because we had much of a problem with the upload program that we created for uploading Attributes. LSMW is comparitively simple.
    Please refer notes 101014,1066952 for more info and hope this helps.
    Please assign points.
    regards,
    Muralidhar Prasad Chatna

  • Standard program / bdc / bapi to upload customer data.

    hi experts,
        i need standard program/bdc/lsmw/bapi to upload customer  amster data .

    Hi,
    Please check this links on how to use direct input program RFBIDE00.
    http://www.sapbrain.com/TOOLS/LSMW/SAP_LSMW_steps_introduction.html
    http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc
    Regards,
    Ferry Lianto

  • Automating Cash Journal Posting using inbound proxy interface and upload program

    Hi Experts,
    I have a requirement where in cash journal posting needs to be carried out automatically by an inbound interface on a periodic basis and at the start during cut over an upload program needs to be used to upload beg balance data . For this purpose I have used BAPI_CASHJOURNALDOC_CREATE to save cash journal entries along with BAPI TRANSACTION COMMIT.
    Once the Data is successfully saved I am using FM FCJ_GET_DATA_FOR_SCREEN to get prerequisite data for the FM FCJ_POST_ALL which is used by the Standard cash journal program internally to post the saved data. ( I got this by debugging the standard transaction and both FMs are not yet released )
    The issues I am facing is that the the FM FCJ_POST_ALL does not always post the data it behaves in random fashion i.e some times it posts the entries where as sometimes it does not post the entries.
    I have tried using commit work after the FM but that also does not result in consistent behavior of the program. One more issue is the i am not allowed to use commit work in a an inbound proxy so how do i proceed ?
    I am attaching the code for further analysis:
    DATA: LIT_TCJ_TRANS_NAMES TYPE TABLE OF TCJ_TRANS_NAMES,
             LWA_TCJ_TRANS_NAMES TYPE TCJ_TRANS_NAMES,
             LV_WAIT             TYPE BAPITA-WAIT VALUE '1',
             LV_RECORD_NO        TYPE SY-TABIX.
       DATA : LIT_POSTING        TYPE STANDARD TABLE OF ISCJ_POSTINGS,
              LIT_WTAX_ITEMS     TYPE STANDARD TABLE OF TCJ_WTAX_ITEMS,
              LIT_SPLIT_POSTINGS TYPE STANDARD TABLE OF ISCJ_POSTINGS,
              LIT_CPD            TYPE STANDARD TABLE OF TCJ_CPD.
       DATA: LV_BEG_BALANCE      TYPE CJAMOUNT,
             LV_TOTAL_RECEIPTS   TYPE CJAMOUNT,
             LV_TOTAL_PAYMENTS   TYPE CJAMOUNT,
             LV_TOTAL_CHECKS     TYPE CJAMOUNT,
             LV_RUN_BALANCE      TYPE CJAMOUNT,
             LV_RUN_CASH_BALANCE TYPE CJAMOUNT,
             LV_NUMB_OF_REC      TYPE I,
             LV_NUMB_OF_PAYM     TYPE I,
             LV_NUMB_OF_CHECKS   TYPE I.
       DESCRIBE TABLE GIT_CJ LINES GV_TOTAL_RECORDS.
       SELECT MANDT COMP_CODE TRANSACT_NUMBER LANGU TRANSACT_NAME LONG_TEXT
          FROM TCJ_TRANS_NAMES
          INTO TABLE LIT_TCJ_TRANS_NAMES
          WHERE LANGU = GC_EN.
       IF SY-SUBRC <> 0.
         MESSAGE 'No Business Transaction maintained for Company Code in this client'(016) TYPE GC_I.
         LEAVE LIST-PROCESSING.
       ENDIF.
       DESCRIBE TABLE GIT_CJ LINES GV_TOTAL_RECORDS.
       LOOP AT GIT_CJ INTO GWA_CJ.
         LV_RECORD_NO = SY-TABIX.
         CLEAR: GS_HEADER_BAPI,
                GS_CJ_KEY,
                GWA_ITEMS.
         REFRESH: GIT_ITEMS,
                  GIT_RETURN.
         GS_HEADER_BAPI-COMP_CODE    = GWA_CJ-BUKRS.
         GS_HEADER_BAPI-CAJO_NUMBER  = GWA_CJ-CJNR.
         GS_HEADER_BAPI-CURRENCY     = GC_PHP.
         CLEAR LWA_TCJ_TRANS_NAMES.
         READ TABLE LIT_TCJ_TRANS_NAMES INTO LWA_TCJ_TRANS_NAMES WITH KEY COMP_CODE     = GWA_CJ-BUKRS
                                                                          LANGU         = GC_EN
                                                                          TRANSACT_NAME = GWA_CJ-BTNAM.
         IF SY-SUBRC = 0.
           GWA_ITEMS-TRANSACT_NUMBER = LWA_TCJ_TRANS_NAMES-TRANSACT_NUMBER.
           GWA_ITEMS-P_RECEIPTS        = GWA_CJ-CJRAT.
           GWA_ITEMS-TAX_CODE          = GWA_CJ-TXCOD.
           GS_HEADER_BAPI-BP_NAME      = GWA_CJ-BPNAM.
           GWA_ITEMS-POSITION_TEXT     = GWA_CJ-POTXT.
           CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
               INPUT  = GWA_CJ-LIFNR
             IMPORTING
               OUTPUT = GWA_ITEMS-VENDOR_NO.
           CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
               INPUT  = GWA_CJ-KUNNR
             IMPORTING
               OUTPUT = GWA_ITEMS-CUSTOMER.
           PERFORM SUB_DATE_FROMAT_BAPI  CHANGING  GWA_CJ-BLDAT
                                                   GS_HEADER_BAPI-DOC_DATE.
           PERFORM SUB_DATE_FROMAT_BAPI  CHANGING   GWA_CJ-BUDAT
                                                    GS_HEADER_BAPI-PSTNG_DATE.
           GS_HEADER_BAPI-REF_DOC_NO   = GWA_CJ-XBLNR.
           GS_HEADER_BAPI-ALLOC_NMBR   = GWA_CJ-ALLNO.
           CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
               INPUT  = GWA_CJ-KOSTL
             IMPORTING
               OUTPUT = GWA_ITEMS-COSTCENTER.
           CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
               INPUT  = GWA_CJ-PRCTR
             IMPORTING
               OUTPUT = GWA_ITEMS-PROFIT_CTR.
           APPEND GWA_ITEMS TO GIT_ITEMS.
           CALL FUNCTION 'BAPI_CASHJOURNALDOC_CREATE'
             EXPORTING
               HEADER              = GS_HEADER_BAPI
             IMPORTING
               COMPANY_CODE        = GS_CJ_KEY-COMP_CODE
               CASH_JOURNAL_NUMBER = GS_CJ_KEY-CAJO_NUMBER
               FISCAL_YEAR         = GS_CJ_KEY-FISC_YEAR
               CASH_JOURNAL_DOC_NO = GS_CJ_KEY-POSTING_NUMBER
             TABLES
               ITEMS               = GIT_ITEMS
               RETURN              = GIT_RETURN.
           IF GIT_RETURN IS NOT INITIAL.
             READ TABLE GIT_RETURN INTO GWA_RETURN WITH KEY TYPE = GC_E.
             IF SY-SUBRC <> 0.
               CLEAR GWA_CJ_S.
               MOVE-CORRESPONDING GS_CJ_KEY TO GWA_CJ_S.
               CLEAR GWA_RETURN.
               READ TABLE GIT_RETURN INTO GWA_RETURN WITH KEY TYPE = GC_S.
               IF SY-SUBRC = 0.
                 MOVE GWA_RETURN-MESSAGE TO GWA_CJ_S-MSG.
                 CLEAR GWA_RETURN.
                 READ TABLE GIT_RETURN INTO GWA_RETURN WITH KEY TYPE = GC_I.
                 IF SY-SUBRC = 0.
                   CLEAR GWA_CJ_E.
                   CONCATENATE GWA_RETURN-MESSAGE GWA_CJ_S-MSG INTO GWA_CJ_E-MSG SEPARATED BY GC_PIPE_FORMAT.
                   MOVE-CORRESPONDING GS_HEADER_BAPI TO GWA_CJ_E.
                   GWA_CJ_E-POSTING_NUMBER = LV_RECORD_NO.
                   APPEND GWA_CJ_E TO GIT_CJ_E.
                   GV_ERROR_RECORDS = GV_ERROR_RECORDS + GC_1.
                 ELSE.
                   IF P_TEST NE GC_X.
                     CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                       EXPORTING
                         WAIT = LV_WAIT.
                     REFRESH:LIT_POSTING        ,
                             LIT_WTAX_ITEMS     ,
                             LIT_SPLIT_POSTINGS ,
                             LIT_CPD            .
                     CLEAR: LV_BEG_BALANCE      ,
                            LV_TOTAL_RECEIPTS   ,
                            LV_TOTAL_PAYMENTS   ,
                            LV_TOTAL_CHECKS     ,
                            LV_RUN_BALANCE      ,
                            LV_RUN_CASH_BALANCE ,
                            LV_NUMB_OF_REC      ,
                            LV_NUMB_OF_PAYM     ,
                            LV_NUMB_OF_CHECKS   .
                     CALL FUNCTION 'FCJ_GET_DATA_FOR_SCREEN'
                       EXPORTING
                         I_COMP_CODE            = GS_CJ_KEY-COMP_CODE
                         I_CAJO_NUMBER          = GS_CJ_KEY-CAJO_NUMBER
                         I_DISPLAY_PERIOD_LO    = GS_HEADER_BAPI-PSTNG_DATE
                         I_DISPLAY_PERIOD_HI    = GS_HEADER_BAPI-PSTNG_DATE
                       IMPORTING
                         E_BEGINNING_BALANCE    = LV_BEG_BALANCE
                         E_RUNNING_BALANCE      = LV_RUN_BALANCE
                         E_RUNNING_CASH_BALANCE = LV_RUN_CASH_BALANCE
                         E_TOTAL_RECEIPTS       = LV_TOTAL_RECEIPTS
                         E_TOTAL_REC_NUMBER     = LV_NUMB_OF_REC
                         E_TOTAL_PAYMENTS       = LV_TOTAL_PAYMENTS
                         E_TOTAL_PAYM_NUMBER    = LV_NUMB_OF_PAYM
                         E_TOTAL_CHECKS         = LV_TOTAL_CHECKS
                         E_TOTAL_CHECKS_NUMBER  = LV_NUMB_OF_CHECKS
                       TABLES
                         E_POSTINGS             = LIT_POSTING
                         E_WTAX_ITEMS           = LIT_WTAX_ITEMS
                         E_SPLIT_POSTINGS       = LIT_SPLIT_POSTINGS
                         E_CPD                  = LIT_CPD.
                     CALL FUNCTION 'FCJ_POST_ALL'
                       EXPORTING
                         I_COMP_CODE               = GS_CJ_KEY-COMP_CODE
                         I_CAJO_NUMBER             = GS_CJ_KEY-CAJO_NUMBER
                         I_CURRENCY                = GS_HEADER_BAPI-CURRENCY
                         I_TYP                     = 'R'
                         I_DISPLAY_PERIOD_LO       = GS_HEADER_BAPI-PSTNG_DATE
                         I_DISPLAY_PERIOD_HI       = GS_HEADER_BAPI-PSTNG_DATE
    *              IMPORTING
    *                E_ERROR_NUMBER            =
                       TABLES
                         ITCJ_POSTINGS             = LIT_POSTING
                         ITCJ_WTAX_ITEMS           = LIT_WTAX_ITEMS
                         ITCJ_SPLIT_POSTINGS       = LIT_SPLIT_POSTINGS
                         ITCJ_CPD                  = LIT_CPD
                       CHANGING
                         P_BEG_BALANCE             = LV_BEG_BALANCE
                         P_TOTAL_RECEIPTS          = LV_TOTAL_RECEIPTS
                         P_TOTAL_PAYMENTS          = LV_TOTAL_PAYMENTS
                         P_TOTAL_CHECKS            = LV_TOTAL_CHECKS
                         P_RUN_BALANCE             = LV_RUN_BALANCE
                         P_RUN_CASH_BALANCE        = LV_RUN_CASH_BALANCE
                         P_NUMB_OF_REC             = LV_NUMB_OF_REC
                         P_NUMB_OF_PAYM            = LV_NUMB_OF_PAYM
                         P_NUMB_OF_CHECKS          = LV_NUMB_OF_CHECKS.
                     COMMIT WORK.
                   ENDIF.
                   APPEND GWA_CJ_S TO GIT_CJ_S.
                   GV_SUCCESS_RECORDS = GV_SUCCESS_RECORDS + GC_1.
                   CLEAR GWA_CJ_S.
                 ENDIF.
               ENDIF.
             ELSE.
               CLEAR GWA_CJ_E.
               MOVE-CORRESPONDING GS_HEADER_BAPI TO GWA_CJ_E.
               MOVE GWA_RETURN-MESSAGE TO GWA_CJ_E-MSG.
               GWA_CJ_E-POSTING_NUMBER = LV_RECORD_NO.
               APPEND GWA_CJ_E TO GIT_CJ_E.
               GV_ERROR_RECORDS = GV_ERROR_RECORDS + GC_1.
             ENDIF.
           ENDIF.
         ELSE.
           GWA_RETURN-MESSAGE = 'Transaction Name does not correspond to any Transaction Number'(017).
           CLEAR GWA_CJ_E.
           MOVE-CORRESPONDING GS_HEADER_BAPI TO GWA_CJ_E.
           MOVE GWA_RETURN-MESSAGE TO GWA_CJ_E-MSG.
           GWA_CJ_E-POSTING_NUMBER = LV_RECORD_NO.
           APPEND GWA_CJ_E TO GIT_CJ_E.
           GV_ERROR_RECORDS = GV_ERROR_RECORDS + GC_1.
         ENDIF.
       ENDLOOP.
    ENDFORM.                    " SUB_BAPI_CALL

    Hi Experts,
    I have a requirement where in cash journal posting needs to be carried out automatically by an inbound interface on a periodic basis and at the start during cut over an upload program needs to be used to upload beg balance data . For this purpose I have used BAPI_CASHJOURNALDOC_CREATE to save cash journal entries along with BAPI TRANSACTION COMMIT.
    Once the Data is successfully saved I am using FM FCJ_GET_DATA_FOR_SCREEN to get prerequisite data for the FM FCJ_POST_ALL which is used by the Standard cash journal program internally to post the saved data. ( I got this by debugging the standard transaction and both FMs are not yet released )
    The issues I am facing is that the the FM FCJ_POST_ALL does not always post the data it behaves in random fashion i.e some times it posts the entries where as sometimes it does not post the entries.
    I have tried using commit work after the FM but that also does not result in consistent behavior of the program. One more issue is the i am not allowed to use commit work in a an inbound proxy so how do i proceed ?
    I am attaching the code for further analysis:
    DATA: LIT_TCJ_TRANS_NAMES TYPE TABLE OF TCJ_TRANS_NAMES,
             LWA_TCJ_TRANS_NAMES TYPE TCJ_TRANS_NAMES,
             LV_WAIT             TYPE BAPITA-WAIT VALUE '1',
             LV_RECORD_NO        TYPE SY-TABIX.
       DATA : LIT_POSTING        TYPE STANDARD TABLE OF ISCJ_POSTINGS,
              LIT_WTAX_ITEMS     TYPE STANDARD TABLE OF TCJ_WTAX_ITEMS,
              LIT_SPLIT_POSTINGS TYPE STANDARD TABLE OF ISCJ_POSTINGS,
              LIT_CPD            TYPE STANDARD TABLE OF TCJ_CPD.
       DATA: LV_BEG_BALANCE      TYPE CJAMOUNT,
             LV_TOTAL_RECEIPTS   TYPE CJAMOUNT,
             LV_TOTAL_PAYMENTS   TYPE CJAMOUNT,
             LV_TOTAL_CHECKS     TYPE CJAMOUNT,
             LV_RUN_BALANCE      TYPE CJAMOUNT,
             LV_RUN_CASH_BALANCE TYPE CJAMOUNT,
             LV_NUMB_OF_REC      TYPE I,
             LV_NUMB_OF_PAYM     TYPE I,
             LV_NUMB_OF_CHECKS   TYPE I.
       DESCRIBE TABLE GIT_CJ LINES GV_TOTAL_RECORDS.
       SELECT MANDT COMP_CODE TRANSACT_NUMBER LANGU TRANSACT_NAME LONG_TEXT
          FROM TCJ_TRANS_NAMES
          INTO TABLE LIT_TCJ_TRANS_NAMES
          WHERE LANGU = GC_EN.
       IF SY-SUBRC <> 0.
         MESSAGE 'No Business Transaction maintained for Company Code in this client'(016) TYPE GC_I.
         LEAVE LIST-PROCESSING.
       ENDIF.
       DESCRIBE TABLE GIT_CJ LINES GV_TOTAL_RECORDS.
       LOOP AT GIT_CJ INTO GWA_CJ.
         LV_RECORD_NO = SY-TABIX.
         CLEAR: GS_HEADER_BAPI,
                GS_CJ_KEY,
                GWA_ITEMS.
         REFRESH: GIT_ITEMS,
                  GIT_RETURN.
         GS_HEADER_BAPI-COMP_CODE    = GWA_CJ-BUKRS.
         GS_HEADER_BAPI-CAJO_NUMBER  = GWA_CJ-CJNR.
         GS_HEADER_BAPI-CURRENCY     = GC_PHP.
         CLEAR LWA_TCJ_TRANS_NAMES.
         READ TABLE LIT_TCJ_TRANS_NAMES INTO LWA_TCJ_TRANS_NAMES WITH KEY COMP_CODE     = GWA_CJ-BUKRS
                                                                          LANGU         = GC_EN
                                                                          TRANSACT_NAME = GWA_CJ-BTNAM.
         IF SY-SUBRC = 0.
           GWA_ITEMS-TRANSACT_NUMBER = LWA_TCJ_TRANS_NAMES-TRANSACT_NUMBER.
           GWA_ITEMS-P_RECEIPTS        = GWA_CJ-CJRAT.
           GWA_ITEMS-TAX_CODE          = GWA_CJ-TXCOD.
           GS_HEADER_BAPI-BP_NAME      = GWA_CJ-BPNAM.
           GWA_ITEMS-POSITION_TEXT     = GWA_CJ-POTXT.
           CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
               INPUT  = GWA_CJ-LIFNR
             IMPORTING
               OUTPUT = GWA_ITEMS-VENDOR_NO.
           CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
               INPUT  = GWA_CJ-KUNNR
             IMPORTING
               OUTPUT = GWA_ITEMS-CUSTOMER.
           PERFORM SUB_DATE_FROMAT_BAPI  CHANGING  GWA_CJ-BLDAT
                                                   GS_HEADER_BAPI-DOC_DATE.
           PERFORM SUB_DATE_FROMAT_BAPI  CHANGING   GWA_CJ-BUDAT
                                                    GS_HEADER_BAPI-PSTNG_DATE.
           GS_HEADER_BAPI-REF_DOC_NO   = GWA_CJ-XBLNR.
           GS_HEADER_BAPI-ALLOC_NMBR   = GWA_CJ-ALLNO.
           CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
               INPUT  = GWA_CJ-KOSTL
             IMPORTING
               OUTPUT = GWA_ITEMS-COSTCENTER.
           CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
               INPUT  = GWA_CJ-PRCTR
             IMPORTING
               OUTPUT = GWA_ITEMS-PROFIT_CTR.
           APPEND GWA_ITEMS TO GIT_ITEMS.
           CALL FUNCTION 'BAPI_CASHJOURNALDOC_CREATE'
             EXPORTING
               HEADER              = GS_HEADER_BAPI
             IMPORTING
               COMPANY_CODE        = GS_CJ_KEY-COMP_CODE
               CASH_JOURNAL_NUMBER = GS_CJ_KEY-CAJO_NUMBER
               FISCAL_YEAR         = GS_CJ_KEY-FISC_YEAR
               CASH_JOURNAL_DOC_NO = GS_CJ_KEY-POSTING_NUMBER
             TABLES
               ITEMS               = GIT_ITEMS
               RETURN              = GIT_RETURN.
           IF GIT_RETURN IS NOT INITIAL.
             READ TABLE GIT_RETURN INTO GWA_RETURN WITH KEY TYPE = GC_E.
             IF SY-SUBRC <> 0.
               CLEAR GWA_CJ_S.
               MOVE-CORRESPONDING GS_CJ_KEY TO GWA_CJ_S.
               CLEAR GWA_RETURN.
               READ TABLE GIT_RETURN INTO GWA_RETURN WITH KEY TYPE = GC_S.
               IF SY-SUBRC = 0.
                 MOVE GWA_RETURN-MESSAGE TO GWA_CJ_S-MSG.
                 CLEAR GWA_RETURN.
                 READ TABLE GIT_RETURN INTO GWA_RETURN WITH KEY TYPE = GC_I.
                 IF SY-SUBRC = 0.
                   CLEAR GWA_CJ_E.
                   CONCATENATE GWA_RETURN-MESSAGE GWA_CJ_S-MSG INTO GWA_CJ_E-MSG SEPARATED BY GC_PIPE_FORMAT.
                   MOVE-CORRESPONDING GS_HEADER_BAPI TO GWA_CJ_E.
                   GWA_CJ_E-POSTING_NUMBER = LV_RECORD_NO.
                   APPEND GWA_CJ_E TO GIT_CJ_E.
                   GV_ERROR_RECORDS = GV_ERROR_RECORDS + GC_1.
                 ELSE.
                   IF P_TEST NE GC_X.
                     CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                       EXPORTING
                         WAIT = LV_WAIT.
                     REFRESH:LIT_POSTING        ,
                             LIT_WTAX_ITEMS     ,
                             LIT_SPLIT_POSTINGS ,
                             LIT_CPD            .
                     CLEAR: LV_BEG_BALANCE      ,
                            LV_TOTAL_RECEIPTS   ,
                            LV_TOTAL_PAYMENTS   ,
                            LV_TOTAL_CHECKS     ,
                            LV_RUN_BALANCE      ,
                            LV_RUN_CASH_BALANCE ,
                            LV_NUMB_OF_REC      ,
                            LV_NUMB_OF_PAYM     ,
                            LV_NUMB_OF_CHECKS   .
                     CALL FUNCTION 'FCJ_GET_DATA_FOR_SCREEN'
                       EXPORTING
                         I_COMP_CODE            = GS_CJ_KEY-COMP_CODE
                         I_CAJO_NUMBER          = GS_CJ_KEY-CAJO_NUMBER
                         I_DISPLAY_PERIOD_LO    = GS_HEADER_BAPI-PSTNG_DATE
                         I_DISPLAY_PERIOD_HI    = GS_HEADER_BAPI-PSTNG_DATE
                       IMPORTING
                         E_BEGINNING_BALANCE    = LV_BEG_BALANCE
                         E_RUNNING_BALANCE      = LV_RUN_BALANCE
                         E_RUNNING_CASH_BALANCE = LV_RUN_CASH_BALANCE
                         E_TOTAL_RECEIPTS       = LV_TOTAL_RECEIPTS
                         E_TOTAL_REC_NUMBER     = LV_NUMB_OF_REC
                         E_TOTAL_PAYMENTS       = LV_TOTAL_PAYMENTS
                         E_TOTAL_PAYM_NUMBER    = LV_NUMB_OF_PAYM
                         E_TOTAL_CHECKS         = LV_TOTAL_CHECKS
                         E_TOTAL_CHECKS_NUMBER  = LV_NUMB_OF_CHECKS
                       TABLES
                         E_POSTINGS             = LIT_POSTING
                         E_WTAX_ITEMS           = LIT_WTAX_ITEMS
                         E_SPLIT_POSTINGS       = LIT_SPLIT_POSTINGS
                         E_CPD                  = LIT_CPD.
                     CALL FUNCTION 'FCJ_POST_ALL'
                       EXPORTING
                         I_COMP_CODE               = GS_CJ_KEY-COMP_CODE
                         I_CAJO_NUMBER             = GS_CJ_KEY-CAJO_NUMBER
                         I_CURRENCY                = GS_HEADER_BAPI-CURRENCY
                         I_TYP                     = 'R'
                         I_DISPLAY_PERIOD_LO       = GS_HEADER_BAPI-PSTNG_DATE
                         I_DISPLAY_PERIOD_HI       = GS_HEADER_BAPI-PSTNG_DATE
    *              IMPORTING
    *                E_ERROR_NUMBER            =
                       TABLES
                         ITCJ_POSTINGS             = LIT_POSTING
                         ITCJ_WTAX_ITEMS           = LIT_WTAX_ITEMS
                         ITCJ_SPLIT_POSTINGS       = LIT_SPLIT_POSTINGS
                         ITCJ_CPD                  = LIT_CPD
                       CHANGING
                         P_BEG_BALANCE             = LV_BEG_BALANCE
                         P_TOTAL_RECEIPTS          = LV_TOTAL_RECEIPTS
                         P_TOTAL_PAYMENTS          = LV_TOTAL_PAYMENTS
                         P_TOTAL_CHECKS            = LV_TOTAL_CHECKS
                         P_RUN_BALANCE             = LV_RUN_BALANCE
                         P_RUN_CASH_BALANCE        = LV_RUN_CASH_BALANCE
                         P_NUMB_OF_REC             = LV_NUMB_OF_REC
                         P_NUMB_OF_PAYM            = LV_NUMB_OF_PAYM
                         P_NUMB_OF_CHECKS          = LV_NUMB_OF_CHECKS.
                     COMMIT WORK.
                   ENDIF.
                   APPEND GWA_CJ_S TO GIT_CJ_S.
                   GV_SUCCESS_RECORDS = GV_SUCCESS_RECORDS + GC_1.
                   CLEAR GWA_CJ_S.
                 ENDIF.
               ENDIF.
             ELSE.
               CLEAR GWA_CJ_E.
               MOVE-CORRESPONDING GS_HEADER_BAPI TO GWA_CJ_E.
               MOVE GWA_RETURN-MESSAGE TO GWA_CJ_E-MSG.
               GWA_CJ_E-POSTING_NUMBER = LV_RECORD_NO.
               APPEND GWA_CJ_E TO GIT_CJ_E.
               GV_ERROR_RECORDS = GV_ERROR_RECORDS + GC_1.
             ENDIF.
           ENDIF.
         ELSE.
           GWA_RETURN-MESSAGE = 'Transaction Name does not correspond to any Transaction Number'(017).
           CLEAR GWA_CJ_E.
           MOVE-CORRESPONDING GS_HEADER_BAPI TO GWA_CJ_E.
           MOVE GWA_RETURN-MESSAGE TO GWA_CJ_E-MSG.
           GWA_CJ_E-POSTING_NUMBER = LV_RECORD_NO.
           APPEND GWA_CJ_E TO GIT_CJ_E.
           GV_ERROR_RECORDS = GV_ERROR_RECORDS + GC_1.
         ENDIF.
       ENDLOOP.
    ENDFORM.                    " SUB_BAPI_CALL

  • PA40 employee termination Upload program

    hi friends..
    i am facing one issue.. plz give me some idea to resolve tis..
    Hr module - In TCode pa40 we can terminate a single employee by giving a necessary data..
    but my client asking me a upload program to terminate a set of employees..
    I tried by recording(SHDB) but its not possible because while terminating a employee it terminate all the infotype maintained for that employee..
    Number of infotype maintain for a employee is vary from employee to employee.
    is there any standard LSMW- direct input method is available? or any BAPI is available ?
    can you throw some light to resolve tis?
    thanks in advance..

    Hi Deva,
    I am facing the same issue.  Did you ever get a solution to this problem??
    Thanks
    Shane

  • Interface Using BAPI for Uploading shipment datas

    Can any1 send me the example code for Inbound Interface using BAPI for Uploading shipment datas.please kindly send me the programs which u using with BAPI

    Hi
    Except hiring (or new joinee) for all other actions you can use below Function Module.
    HR_INFOTYPE_OPERATION.
    ~~~Ganesh Kumar K.

  • BAPI to upload serial number master

    Hi Gurus,
    Is there any BAPI to upload serial number masters?
    Thanks in advance for your cooperation,
    Regards,
    Sudhir Dahake

    I found my question resloved.
    Actually, in previous version, the standard program has been modified by taking access key. When the upgradation happened, it got overwrited to the previous one. So, in recent version it is not appearing.
    Thanks.
    Nrusingha

  • Bapi for IA05: Please let me know if there is any bapi to upload Task list

    Hi,
    Please let me know if there is any BAPI to upload Task list (TCOde : IA05).
    Thanks

    you can try with below LSMW Batch Input method
    Object 0490 Gen.task list
    Method 0000
    Program Name IBIP
    Program Type B Batch Input
    or BAPI_ROUTING_CREATE
    refer below link
    Transaction IA05  -  Create general maintenance task list

  • RM06IBI0 in upload program

    Hi all.
    I am writing a full MM upload program and amongst other things I have to upload PIR's. I understand there is no FM or BAPI to use which would make things nice and easy. For performance issues I don't really wish to use a BDC either.
    I have read about program RM06IBI0 that is used for LSMWs. Can someone please advise how I would call this from a standard ABAP. I understand that I would have to create a header and line item table to be uploaded via RM06IBI0.
    If anyone has used this program within an upload process other than LSMW I would be interested to hear from you.
    Cheers.

    I need the answer too the same problem can anybody help !!

  • Invoice Upload Program in FB50

    Hi Experts,
       I need to develop an invoice upload program for transaction code FB50. The data will be from an Excel file.
       As I'm new to program in accounting, is there anyone has sample code?
       I'm not sure what function module to use to save the invoice.
       Hope someone can help me. Many thanks in advance.

    Hi Sam,
         It generally depends on what sort of postings you are doing.
    You can refer to following code, it is for the posting of invoices.
        Document Header
               wa_document_header-comp_code  = c_company_2001.
        One time vendor
         Concatenate the text and account number and pass it as a line item text
         Check for the Payee name and use vendor number accordingly
         Check if amount value is more than '0'
         Vendor line item
         GL Account line item
         Get currency details for vendor line item
         Get currency details for GL Account line item
         Pass suitable posting key
         Pass suitable posting key
                 When posting amount is less than zero
         Vendor line item
         Get currency details for vendor line item
         Get currency details for GL Account line item
         GL Account line item
         Pass suitable posting key
         Pass suitable posting key
         Check if one time vendor data is available
         Call the BAPI 'BAPI_ACC_DOCUMENT_POST' to create the invoices
          Check if bapi return table is intial
         Maintain a error log with all BAPI returned messages
         Get only error\abort messages into error table
         check if flag has been enabled
         Check for the message type in the return table and
         if it is success then commit the transaction.
         Concatenate the message text and refund id into a variable
         append success messge to the error table
         Refresh the internal tables
         Clear the work areas and variables
             LOOP AT it_record INTO wa_record.
                  wa_document_header-username   = sy-uname.
                  wa_document_header-comp_code  = v_compcode.
                  wa_document_header-doc_date   = wa_record-bkpf_bldat.
                  wa_document_header-pstng_date = sy-datum.
                  wa_document_header-doc_type   = v_doctype.
                  wa_document_header-ref_doc_no = wa_record-bkpf_xblnr.
                  wa_customercpd-name       = wa_record-bsec_name1.
                  wa_customercpd-name_2     = wa_record-bsec_name2.
                  wa_customercpd-postl_code = wa_record-bsec_pstlz.
                  wa_customercpd-city       = wa_record-bsec_ort01.
                  wa_customercpd-country    = v_country.
                  wa_customercpd-street     = wa_record-bsec_stras.
                  wa_customercpd-tax_no_1   = wa_record-bsec_stcd1.
                  wa_customercpd-tax_no_2   = wa_record-bsec_stcd2.
                  wa_customercpd-region     = wa_record-bsec_regio.
                  CONCATENATE text-008 wa_record-bseg_sgtxt INTO v_item_text              " Refund for Acc no
                                                            SEPARATED BY space.
                  IF wa_record-bsec_name1 = c_name_heap.
                    v_vendor_no = v_vendor_heap.
                  ELSE.
                    v_vendor_no = v_vendor_onetime.
                  ENDIF.
                  IF wa_record-bseg_wrbtr GT 0.
                    wa_acc_payable-itemno_acc = c_itemno_1.
                    wa_acc_payable-vendor_no  = v_vendor_no.
                    wa_acc_payable-item_text  = v_item_text.
                    APPEND wa_acc_payable TO it_acc_payable.
                    CLEAR: wa_acc_payable.
                    wa_accountgl-itemno_acc = c_itemno_2.
                    wa_accountgl-gl_account = v_glaccount.
                    wa_accountgl-item_text  = v_item_text.
                    APPEND wa_accountgl TO it_accountgl.
                    CLEAR: wa_accountgl.
                    wa_currency_amount-itemno_acc  = c_itemno_1.
                    wa_currency_amount-currency    = c_currency_usd .
                    wa_currency_amount-amt_doccur  = - ( wa_record-bseg_wrbtr ).
                    APPEND wa_currency_amount TO it_currency_amount.
                    CLEAR: wa_currency_amount.
                    wa_currency_amount-itemno_acc  = c_itemno_2.
                    wa_currency_amount-currency    = c_currency_usd .
                    wa_currency_amount-amt_doccur  = wa_record-bseg_wrbtr.
                    APPEND wa_currency_amount TO it_currency_amount.
                    CLEAR: wa_currency_amount.
                    wa_extension2-structure   = c_structure.
                    wa_extension2-valuepart1  = c_itemno_1.
                    wa_extension2-valuepart2  = c_newbs_31.          " Credit indicator( Vendor side )
                    APPEND wa_extension2 TO it_extension2.
                    CLEAR: wa_extension2.
                    wa_extension2-structure   = c_structure.
                    wa_extension2-valuepart1  = c_itemno_2.
                    wa_extension2-valuepart2  = c_newbs_40.          " Debit indicator( GL Account side )
                    APPEND wa_extension2 TO it_extension2.
                    CLEAR: wa_extension2.
                  ELSE.
                    wa_acc_payable-itemno_acc = c_itemno_1.
                    wa_acc_payable-vendor_no  = v_vendor_no.
                    wa_acc_payable-item_text  = v_item_text.
                    APPEND wa_acc_payable TO it_acc_payable.
                    CLEAR: wa_acc_payable.
                    wa_currency_amount-itemno_acc  = c_itemno_1.
                    wa_currency_amount-currency    = c_currency_usd .
                    wa_currency_amount-amt_doccur  = wa_record-bseg_wrbtr.
                    APPEND wa_currency_amount TO it_currency_amount.
                    CLEAR: wa_currency_amount.
                    wa_currency_amount-itemno_acc  = c_itemno_2.
                    wa_currency_amount-currency    = c_currency_usd .
                    wa_currency_amount-amt_doccur  = - ( wa_record-bseg_wrbtr ).
                    APPEND wa_currency_amount TO it_currency_amount.
                    CLEAR: wa_currency_amount.
                    wa_accountgl-itemno_acc = c_itemno_2.
                    wa_accountgl-gl_account = v_glaccount.
                    wa_accountgl-item_text  = v_item_text.
                    APPEND wa_accountgl TO it_accountgl.
                    CLEAR: wa_accountgl.
                    wa_extension2-structure   = c_structure.
                    wa_extension2-valuepart1  = c_itemno_1.
                    wa_extension2-valuepart2  = c_newbs_21.          " Debit indicator( Vendor side )
                    APPEND wa_extension2 TO it_extension2.
                    CLEAR: wa_extension2.
                    wa_extension2-structure   = c_structure.
                    wa_extension2-valuepart1  = c_itemno_2.
                    wa_extension2-valuepart2  = c_newbs_50.          " Credit indicator( GL Account side )
                    APPEND wa_extension2 TO it_extension2.
                    CLEAR: wa_extension2.
                  ENDIF.
                  IF wa_customercpd IS NOT INITIAL.
                    CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
                      EXPORTING
                        documentheader = wa_document_header
                        customercpd    = wa_customercpd
                      TABLES
                        accountgl      = it_accountgl
                        accountpayable = it_acc_payable
                        currencyamount = it_currency_amount
                        return         = it_return
                        extension2     = it_extension2.
                    IF it_return IS NOT INITIAL.
                      LOOP AT it_return INTO wa_return WHERE type = c_msgtype_e OR
                                                             type = c_msgtype_a.
                        CONCATENATE wa_return-message text-013 wa_record-bkpf_xblnr INTO v_msg_text
                                                               SEPARATED BY space.
                        MOVE v_msg_text TO wa_return-message.
                        APPEND wa_return TO it_error.
                        CLEAR: wa_return,
                               v_msg_text.
                        f_error_ind = c_true.
                      ENDLOOP.
                      IF f_error_ind EQ c_true.
                        EXIT.
                      ELSE.
                        DESCRIBE TABLE it_return LINES v_tabix.
                        READ TABLE it_return INDEX v_tabix INTO wa_return.
                        IF sy-subrc = 0.
                          v_total_amount = ABS( wa_record-bseg_wrbtr ) + v_total_amount.    " Total posting amount
                          CONCATENATE wa_return-message text-013 wa_record-bkpf_xblnr INTO v_msg_text
                                                                 SEPARATED BY space.
                          MOVE v_msg_text TO wa_return-message.
                          APPEND wa_return TO it_success.
                          CLEAR: wa_return,
                                 v_msg_text,
                                 v_tabix.
                        ENDIF.
                      ENDIF.
                    ENDIF.
                  ELSE.
                    wa_return-type     = c_msgtype_e.
                    wa_return-message  = text-009.                   " One time vendor details are not found
                    APPEND wa_return TO it_error.
                    CLEAR: wa_return.
                    EXIT.
                  ENDIF.
                  REFRESH: it_return,
                           it_acc_payable,
                           it_currency_amount,
                           it_accountgl,
                           it_extension2.
                  CLEAR: wa_document_header,
                         wa_customercpd,
                         wa_record,
                         v_vendor_no,
                         v_item_text.
                ENDLOOP.
    Sam, before making the postings directly, try using 'BAPI_ACC_DOCUMENT_CHECK' so that
    you will get to mo
    I hope, it will be helpful to you.
    If you want any more help, get back to me.
    Regards,
    Jallu

  • BAPI (Business Application Programming Interface)

    BAPI (Business Application Programming Interface) to upload attendances, absences from legacy system to SAP system
    can sumbody suggest me the process

    If you want to use BAPI´s for this process you should use HR PDC Interphase.
    Check SAP Note 647145 for your reference.
    If you need additional information let us know.

  • Fail safe logic needed for purchase order upload program

    Hello all,
    i am working on creating PO's by reading data from a text file. I need to implement fail safe logic in it, which is to make sure this program uploads all the records in the text file successfully. For example, i have 1000 records in my text file and while running the upload program if the program times out while creating the 500th PO or if SAP is down at that time, then we have 499 PO's created and 501 yet to be created. But if we run the same program again, we will generate duplicate PO's for 499 again. I want to avoid this kind of problem.
    How do i implement this idea?
    Kindly guide me on this.
    Thanks.

    Ok ..
    Then I would suggest you use Application Log to keep the success and error messages of PO processing.
    You can check trsnaction SLG0 and create your own application log object.
    Then you need to use FMs BAL_LOG_* to crate and add messages to it.
    This way you will have a facility to check as which of your records are converted to PO for a run.
    In case SAP gets down in between , still you can find the details using Xn SLG1 and then accordingly remove the records from your file which are already converted to PO.
    Thanks,
    Ram

  • Existing Function modules or Standard upload Programs

    Hi,
    Can any one tell, Are there any Function modules or Standard upload programs exists for following transactions:
    Creating production version(C223)
    Creating Master recipe(C201)
    Creation Apportionment Structure(C202)
    Creation BOM Allocation(CS08)
    (This all tcodes comes under Production planning.)
    Thanks in advance.

    Hi Vanitha,
    Check this
    for C223
    CM_FV_PROD_VERS_MAINTAIN
    CM_FV_PROD_VERS_SAVE
    CM_FV_PROD_VERS_SAVE_ALL
    CY01_ORDER_MODIFY_PROD_VERSION
    For C201
    C2_CU_RECIPE_EXCLUDE_CREATE
    CONTROL_RECIPE_CREATE
    For C202
    APPOINTMENT_GRP_CREATE
    APPOINTMENT_CREATE
    APPOINTMENT_GENERATE
    APPOINTMENT_GENERATE_2
    For CS08
    CSAP_MAT_BOM_ALLOC_CREATE
    Hope it helps...
    Lokesh
    pls. reward appropriate points
    Message was edited by: Lokesh Aggarwal

  • Download and upload program

    Hello to everybody,
    I'm looking for a standard program that can download and upload program' source codes. I found the program REPTRAN (in SAP release 6.0) that can only download the source code (with the include as well), but i didn't find the upload one.
    So, does anyone knows if exist a standard program that can download source codes (comprensive of include) and upload it as well?
    Thanks and bye..

    Hi,
    Here is code which read the Programs & download:
    Here Just pass the itab "SOURCE" into WS_DOWNLOAD.
    function zuplt01f_tr.
    *"*"Local interface:
    *"  IMPORTING
    *"     REFERENCE(PROGRAM_NAME) TYPE  SYREPID
    *"  TABLES
    *"      SOURCE
      data: f(240) type c,
            g type i,
            h(72) type c,
            low type i   .
      read report program_name into source . " state 'A'.
      describe table source  lines count.
    endfunction.
    Raja T

  • HI Masters , I need information for file upload program in web dynpro java

    Hi masters,
           i need some inforamtion and documentation on file upload program in web dynpro java

    Hi surya,
    You can follow this procedure to upload the file
    i) Take One Context Attribute named as "D1" of Type "binary".
    ii) Take one FileUpload UI Element in the Layout Tab.
    iii) Bind FileUpload UI Element's data Property to the taken Context Attribute. Here it is "D1".
    iv) Take one Button UI Element in the Layout Tab named "Upload" and in the Action of that Button write the following Code.
    v) The following code Generates one Folder in the Server & inside that Folder given file is Uploaded.
    File ff=new File("FolderXYZ"); // Creates One Folder with the given Name ( Here Folder name is "FolderXYZ")
    ff.mkdir();
    try
    byte b[]=null;
    IWDAttributeInfo objAttinfo=null;
    IWDModifiableBinaryType binType=null;
    File f=null;
    FileOutputStream fos=null;
    if(wdContext.currentContextElement().getD1()!=null)
    b=wdContext.currentContextElement().getD1();
    objAttinfo=wdContext.getNodeInfo().getAttribute(IPrivateAttachView.IContextElement.D1);
    binType=(IWDModifiableBinaryType)objAttinfo.getModifiableSimpleType();
    f=new File(ff.getName()+"
    "+binType.getFileName());
    fos=new FileOutputStream(f);
    fos.write(b);
    fos.flush();
    fos.close();
    objMessageManager.reportSuccess("File uploaded to server");
    } catch (Exception e)
    objMessageManager.reportException("Unable to upload file to server, error is:"+e,false);
    return;
    The Uploaded file is stored in the folder & that folder is stored in the Server's following Path.
    <Your Server>\c$\usr\sap\J2E\JC00\j2ee\cluster\server0
    You can access your Uploaded file from the following Path
    <Your Server>\c$\usr\sap\J2E\JC00\j2ee\cluster\server0\FolderXYZ
    Regards
    Sagar Ingalwar

Maybe you are looking for