Which BAPI for FB01

Hi,
which is BAPI for FB01 which will help me to update following fields. like
1) Doc Date
2) Doc Type
3) company Code
4)Currency Key
5)Referen
6)Posting Key
7) G/L account
8) Speical G/L indicatior
9)Profit Center
10)Sales Doc. with sample code.
thanks.

Hi,
it may help u.
BAPI for FB01
Thanks,
Sree.

Similar Messages

  • BAPI for FB01

    Hi,
    I am using bapi  BAPI_ACC_DOCUMENT_POST.. for FB01 but i am not getting Two fields
    PstKy (Posting Key for the Next Line Item) and  SGL Ind (Special G/L Indicator for the Next Line Item)
    is any other bapi avilabel for this...
    or please give me sample bapi for FB01 or BAPI_ACC_DOCUMENT_POST.
    <removed by moderator>
    Thanks.
    Edited by: Mike Pokraka on Aug 4, 2008 2:40 PM

    Hi
    The posting keys are setted by the BAPI in according to the item type (customer, vendor and G/L) and the sign of amount.
    The BAPI usually uses the standard posting key: 01/11; 40/50, 21/31.
    If it needs a different posting keys it needs to assign them to a certain operation key (field KOTSL): u can do it in the table T030B.
    Anyway u should consider u can use the BTE RWBAPI01 in order to set own data into FI interfaces.
    Max
    Edited by: max bianchi on Jun 20, 2008 11:16 AM

  • What is exact BAPI for FB01 transaction......

    Hi,
       Currently i got requirement to upload transactional data into FB01 using BAPI. I used BAPI_acc_gl_posting_post but it applicable only for GLs, but i want to upload Vendors, Customers, assets, Materials.. Please tell me apropriate BAPI for the requirement. Its urgent.
    Thanks in advance...........
    Regards,
    Chinna.

    Thanks Atish....
        I have written code using BAPI_ACC_DOCUMENT_POST. But it is not posting and it is not generating Object Key...
    Please go thru the code and tell the solutions....
    Thanks in Advance......
    REPORT  zk_fi_fb01                     .
    Data: v_objkey(20) type c.
    Data: Docheader type BAPIACHE09.
    Data: ACCOUNTGL LIKE BAPIACGL09 occurs 0 with header line,
         ACCOUNTRECEIVABLE like BAPIACAR09,
          ACCOUNTPAYABLE like BAPIACAP09 occurs 0 with header line,
          CURRENCYAMOUNT like BAPIACCR09 occurs 0 with header line,
          RETURN like BAPIRET2 occurs 0.
    Data: obj_typ like BAPIACHE09-OBJ_TYPE,
          OBJ_KEY like BAPIACHE09-OBJ_KEY,
          OBJ_SYS like BAPIACHE09-OBJ_SYS.
    Data: gv_belnr type belnr_d.
    Data:file_Na type String.
    Data: lsys like TBDLS-LOGSYS.
    *START OF SELECTION
    START-OF-SELECTION.
    *CALL FUNCTION 'NUMBER_GET_NEXT'
    EXPORTING
       nr_range_nr                  = '19'
       object                       = 'RF_BELEG' "'FIAA-BELNR'
      QUANTITY                      = '1'
      SUBOBJECT                     = '7777'
      TOYEAR                        = '2007'
      IGNORE_BUFFER                = ' '
    IMPORTING
      NUMBER                        = gv_belnr
    QUANTITY                      =
    RETURNCODE                    =
    *CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
    IMPORTING
      OWN_LOGICAL_SYSTEM                   = lsys
    EXCEPTIONS
      OWN_LOGICAL_SYSTEM_NOT_DEFINED       = 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.
    *concatenate gv_belnr '7777' '2007' into v_objkey.
    *Filling Document Header Details
    *Docheader-OBJ_TYPE = 'BEBD'.
    *Docheader-OBJ_key = V_objkey.
    *Docheader-OBJ_SYS = lsys.
    *docheader-BUS_ACT = 'RFBU'.
    Docheader-USERNAME = sy-uname.
    Docheader-COMP_CODE = '7777'.
    Docheader-DOC_DATE   = '20070725'.
    Docheader-PSTNG_DATE = '20070725'.
    Docheader-FISC_YEAR = '2007'.
    *DOCHEADER-OBJ_KEY_R = 'X'.
    Docheader-DOC_TYPE = 'KR'.
    *Item data for ACCOUNTGL
    ACCOUNTGL-ITEMNO_ACC = '0000000001'.
    ACCOUNTGL-GL_ACCOUNT = '0000000102'.         "99900
    ACCOUNTGL-DOC_TYPE   = 'KR'.
    ACCOUNTGL-COMP_CODE  = '7777'.
    ACCOUNTGL-FISC_YEAR  = '2007'.
    ACCOUNTGL-PSTNG_DATE = '20070725'.
    ACCOUNTGL-DE_CRE_IND = 'S'.
    append ACCOUNTGL.
    ACCOUNTGL-ITEMNO_ACC = '0000000002'.
    ACCOUNTGL-GL_ACCOUNT = '0000400002'.         "99900
    ACCOUNTGL-DOC_TYPE   = 'KR'.
    ACCOUNTGL-COMP_CODE  = '7777'.
    ACCOUNTGL-FISC_YEAR  = '2007'.
    ACCOUNTGL-PSTNG_DATE = '20070725'.
    ACCOUNTGL-DE_CRE_IND = 'H'.
    append ACCOUNTGL.
    *Account payable
    ACCOUNTPAYABLE-ITEMNO_ACC = '0000000001'.
    ACCOUNTPAYABLE-GL_ACCOUNT = '0000000102'.
    ACCOUNTPAYABLE-COMP_CODE  = '7777'.
    append ACCOUNTPAYABLE.
    ACCOUNTPAYABLE-ITEMNO_ACC = '0000000002'.
    ACCOUNTPAYABLE-GL_ACCOUNT = '0000400002'.
    ACCOUNTPAYABLE-COMP_CODE  = '7777'.
    append ACCOUNTPAYABLE.
    *Currency Amount
    CURRENCYAMOUNT-ITEMNO_ACC = '0000000001'.
    CURRENCYAMOUNT-CURRENCY_ISO = 'INR'.
    MOVE 1000 TO CURRENCYAMOUNT-AMT_DOCCUR.
    Append CURRENCYAMOUNT.
    CURRENCYAMOUNT-ITEMNO_ACC = '0000000002'.
    CURRENCYAMOUNT-CURRENCY_ISO = 'INR'.
    MOVE '1000-' to CURRENCYAMOUNT-AMT_DOCCUR.
    Append CURRENCYAMOUNT.
    clear CURRENCYAMOUNT.
    clear ACCOUNTGL.
    CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
      EXPORTING
        documentheader          = Docheader
      CUSTOMERCPD             =
      CONTRACTHEADER          =
    IMPORTING
       OBJ_TYPE                =  obj_typ
       OBJ_KEY                 =  obj_key
       OBJ_SYS                 =  obj_sys
      tables
       ACCOUNTGL               = ACCOUNTGL
      ACCOUNTRECEIVABLE       =
      ACCOUNTPAYABLE          = ACCOUNTPAYABLE
      ACCOUNTTAX              =
        currencyamount          = CURRENCYAMOUNT
      CRITERIA                =
      VALUEFIELD              =
      EXTENSION1              =
        return                  = return.
    if sy-subrc = 0.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = ' '.
    endif.
    if sy-subrc = 0.
    WRITE: / OBJ_KEY,
             OBJ_TYP,
             OBJ_SYS.
    endif.

  • Which BAPI for PO Print

    Anyone know which Bapi/interface i would use to intercept Output Message (PO Print)? My hope is to convert the smartform at print time to a PDF and store it on network as opposed to sending it to a printer.

    Hi,
    Why you need BAPI for PO print?
    You can create PO message type(PO output type) and  assign a SmartForm to your PO message type  in t.code:NACE.
    Based on requirement you need to decide your PO layout and with help of ABAPer you can design PO layout with your PO  SmartForm in t.code: SMARTFORMS.
    Refer details steps for customisation for PO layout with PO message type
    How to configure PO message ?
    During creation of PO, your PO will triggers message type  and upoan saving PO-you will view your PO layout.
    Regards,
    Biju K

  • Which bapi for create activity type

    i use ecc 4.6
    i just find
    BAPI_ACTIVITYTYPEGRP_CREATE
    for create activity group
    but i do not find the bapi for create the activiy type
    which bapi is for create activiy type
    if the sap does not supply this bapi
    wich method to create the activity type (i know shdb can do it)

    BAPI_ACTTYPE_CREATEMULTIPLE

  • Who does know which bapi for Clearing,sucu as F-32 F-44  ,thank you!

    i want to find a bapi for Clearing,such as F-32 F-44 ,
    but i can't find it ,i don't kown whether have such bapi,
    who can tell me ,thank you very much!

    You can use the report RFBIBL00.
    Please read the documentation of this report to have a better idea.
    Generally, this report can post all type of FI douments like document creation, clearing of the documents. So, I think this will solve your purpose.
    Regards,
    Naimesh Patel

  • BDC OR BAPI - FOR FB01 T-CODE

    Dear all,
    I am facing one problem for upload the data from excel to FB01 T-code..
    here my excel sheet is like this
    Doc Date Posting date Doc type Posting key GL account Amount Posting key GL account Amount
    03.04.2010     03.04.2010          40     60011     8391                          50 & GL & TAX again repeate....
    04.04.2010     04.04.2010          40     60011     5496     40     60012     2198   50 & GL & TAX
    05.04.2010     05.04.2010          40     60011     7887     40     60012     0        50 & GL & TAX
    How should i do the program.....
    plz give me any bapi program or bdc program for this type excel sheet....
    plz help me..
    Regards
    margani

    Posting FI documents is one of the more frequently discussed topics here, please search before posting. Do not expect complete solutions for requirements, always work yourself first.
    Thread locked.
    Thomas

  • Intercompany posting issue through bapi for FB01

    Hi,
    I am facing an issue for intercompany document posting.
    I have created a Z program in which I am using BAPI_ACC_DOCUMENT_POST for posting. The document is posted if we post within same company code. But for intercompany it gives error saying: 'G/L account XXX requires a valid tax code' even if for that account tax category is *.
    Please share your valuable inputs on this issue.

    Hi
    The posting keys are setted by the BAPI in according to the item type (customer, vendor and G/L) and the sign of amount.
    The BAPI usually uses the standard posting key: 01/11; 40/50, 21/31.
    If it needs a different posting keys it needs to assign them to a certain operation key (field KOTSL): u can do it in the table T030B.
    Anyway u should consider u can use the BTE RWBAPI01 in order to set own data into FI interfaces.
    Max
    Edited by: max bianchi on Jun 20, 2008 11:16 AM

  • Reg. BAPI for FB01

    Hi Friends,
       I tried to create accounting document from the babi 'BAPI_ACC_DOCUMENT_POST'. In a one line item i need to give withholding tax information. How to pass this value to this bapi. I passed the withholding tax info in the ACCOUNTTAX parameter. But that is not working.
    thanks in advance.
    regards
    sritkanth

    go through this code
    data:gt_accountgl type table of bapiacgl09 with header line,
         gt_accountpayable type table of bapiacap09 with header line,
         gt_currencyamount type table of bapiaccr09 with header line,
         gt_return type table of bapiret2 with header line.
    data:wa_documentheader type bapiache09,
           vcounter type i.
    tables:bdcmsgcoll.
      TABLE TO READ FILE DATA
    data:   begin of gt_uploadfile occurs 0,
           input(200) type c,
           end of gt_uploadfile,
             TABLE FOR DOWNLOAD FILE
           begin of gt_downloadfile occurs 0,
            output type string,
           end of gt_downloadfile,
         TO HOLD HEADER DATA
           begin of gt_header occurs 0,
           counter(1),
           identifier(2),
           bukrs(5),
           accnt(10),
           bldat like sy-datum,
           budat like sy-datum,
           wrbtr(10),
           end of gt_header,
           begin of gt_item occurs 0,
           counter(1),
           identifier(2),
           hkont(10),
           wrbtr(10),
           kostl(10),
           end of gt_item,
        INTERNAL TABLE TOI DISPLAY ERRORS.
          begin of gt_summery occurs 0,
          identifier(2),
          bukrs(5),
          accnt(10),
          msgv1 like bdcmsgcoll-msgv2,
          msgv2 like bdcmsgcoll-msgv2,
          msgnr type string,
          end of gt_summery,
          v_upload type string,
          v_download type string,
          msg type string,
          v_hkont type string,
          v_kostl type string,
          date1 type datum,
          date2 type datum,
    v_refkey like   bapiache09-obj_key.
    *CREATING SELECTION CREITERIA
    parameters:p_gfile like ibipparms-path,
               p_test as checkbox.
              P_DFILE LIKE IBIPPARMS-PATH.
    at selection-screen on value-request for p_gfile.
      perform f4help_upload.
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_DFILE.
    PERFORM F4HELP_DOWNLOAD.
    start-of-selection.
      v_upload = p_gfile.
    V_DOWNLOAD = P_DFILE.
      perform uploadfile.
      perform  sendinto_head_item.
      perform buildbapi.
    end-of-selection.
      perform disp_report.
    *&      Form  F4HELP
          text
    -->  p1        text
    <--  p2        text
    form f4help_upload .
      call function 'F4_FILENAME'
       exporting
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
         field_name          = 'P_GFILE'
       importing
         file_name           = p_gfile
    endform.                                                    " F4HELP
    *&      Form  F4HELP_DOWNLOAD
          text
    -->  p1        text
    <--  p2        text
    form f4help_download .
    CALL FUNCTION 'F4_FILENAME'
      EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
        FIELD_NAME          = 'P_DFILE'
      IMPORTING
        FILE_NAME           = P_DFILE
    endform.                    " F4HELP_DOWNLOAD
    *&      Form  UPLOADFILE
          text
    -->  p1        text
    <--  p2        text
    form uploadfile .
      call function 'GUI_UPLOAD'
        exporting
          filename                      = v_upload
      FILETYPE                      = 'ASC'
    HAS_FIELD_SEPARATOR           = '|'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            = VIRUS_SCAN_PROFILE
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    = FILELENGTH
      HEADER                        = HEADER
        tables
          data_tab                      = gt_uploadfile
       exceptions
         file_open_error               = 1
         file_read_error               = 2
         no_batch                      = 3
         gui_refuse_filetransfer       = 4
         invalid_type                  = 5
         no_authority                  = 6
         unknown_error                 = 7
         bad_data_format               = 8
         header_not_allowed            = 9
         separator_not_allowed         = 10
         header_too_long               = 11
         unknown_dp_error              = 12
         access_denied                 = 13
         dp_out_of_memory              = 14
         disk_full                     = 15
         dp_timeout                    = 16
         others                        = 17
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    " UPLOADFILE
    *&      Form  SENDINTO_HEAD_ITEM
          text
    -->  p1        text
    <--  p2        text
    form sendinto_head_item .
      loop at gt_uploadfile.
        if gt_uploadfile-input+0(1) = '1'.
          split gt_uploadfile-input at cl_abap_char_utilities=>horizontal_tab
          into
                gt_header-counter
                gt_header-identifier
                gt_header-bukrs
                gt_header-accnt
                gt_header-bldat
                gt_header-budat
                gt_header-wrbtr.
          append gt_header.
          clear gt_header.
        else.
          split gt_uploadfile-input at cl_abap_char_utilities=>horizontal_tab
       into   gt_item-counter
              gt_item-identifier
              gt_item-hkont
              gt_item-wrbtr
              gt_item-kostl.
          append gt_item.
          clear gt_item.
        endif.
       BREAK-POINT.
      endloop.
    endform.                    " SENDINTO_HEAD_ITEM
    *&      Form  BUILDBAPI
          text
    -->  p1        text
    <--  p2        text
    form buildbapi .
      loop at gt_header.
       GT_HEADER-BUDAT = sy-datum - 5.
       GT_HEADER-BLDAT = sy-datum.
        vcounter = 1.
        gt_header-wrbtr = gt_header-wrbtr  * -1.
    *FILLING INPORTING PARAMETER STRUCTURE.
        wa_documentheader-comp_code = gt_header-bukrs.
        wa_documentheader-doc_date = gt_header-bldat.
        wa_documentheader-pstng_date = gt_header-budat.
        wa_documentheader-username = sy-uname.
        wa_documentheader-bus_act = 'RFBU'.
        wa_documentheader-doc_type = 'KR'.
        gt_accountpayable-itemno_acc = vcounter.
        gt_accountpayable-vendor_no =  gt_header-accnt.
        append gt_accountpayable.
        clear gt_accountpayable.
        gt_currencyamount-itemno_acc = vcounter.
        gt_currencyamount-currency = 'INR'.
        gt_currencyamount-amt_doccur = gt_header-wrbtr.
        append gt_currencyamount.
        clear gt_currencyamount.
        loop at gt_item where identifier = gt_header-identifier.
          vcounter = vcounter + 1.           .
          gt_accountgl-itemno_acc = vcounter.
          call function 'CONVERSION_EXIT_ALPHA_INPUT'
            exporting
              input  = gt_item-hkont
            importing
              output = gt_item-hkont.
          gt_accountgl-gl_account = gt_item-hkont.
          call function 'CONVERSION_EXIT_ALPHA_INPUT'
            exporting
              input  = gt_item-kostl
            importing
              output = gt_item-kostl.
          gt_accountgl-costcenter = gt_item-kostl.
          gt_accountgl-pstng_date = gt_header-budat.
          append gt_accountgl.
          clear gt_accountgl.
          gt_currencyamount-itemno_acc = vcounter.
          gt_currencyamount-currency = 'INR'.
          gt_currencyamount-amt_doccur = gt_item-wrbtr.
          append gt_currencyamount.
          clear gt_currencyamount.
        endloop.
        call function 'BAPI_ACC_DOCUMENT_POST'
          exporting
            documentheader          = wa_documentheader
          CUSTOMERCPD             = CUSTOMERCPD
          CONTRACTHEADER          = CONTRACTHEADER
         importing
          OBJ_TYPE                = OBJ_TYPE
           obj_key                 =  v_refkey
          OBJ_SYS                 = OBJ_SYS
          tables
           accountgl               = gt_accountgl
          ACCOUNTRECEIVABLE       = ACCOUNTRECEIVABLE
           accountpayable          = gt_accountpayable
          ACCOUNTTAX              = ACCOUNTTAX
            currencyamount          = gt_currencyamount
          CRITERIA                = CRITERIA
          VALUEFIELD              = VALUEFIELD
          EXTENSION1              = EXTENSION1
            return                  = gt_return
          PAYMENTCARD             = PAYMENTCARD
          CONTRACTITEM            = CONTRACTITEM
          EXTENSION2              = EXTENSION2
          REALESTATE              = REALESTATE
        break-point.
        if p_test is initial.
          call function 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      WAIT          = WAIT
    IMPORTING
      RETURN        = RETURN
        endif.         .
      endloop.
    endform.                    " BUILDBAPI
    *&      Form  disp_report
          text
    -->  p1        text
    <--  p2        text
    form disp_report .
      loop at gt_return.
        write:/ gt_return-type,
       gt_return-id,
       gt_return-number,
       gt_return-message,
       gt_return-log_no,
       gt_return-log_msg_no,
       gt_return-message_v1,
       gt_return-message_v2,
       gt_return-message_v3,
       gt_return-message_v4,
       gt_return-parameter,
       gt_return-row,
       gt_return-field,
       gt_return-system.
      endloop..
    endform.                    " disp_report
    reward points if helpful........

  • Require BAPI for creating outgoing Invoice (Accounts Payable).

    Hi Friends,
       As per our requirement, we need to create an outgoing Invoice (ie., Accounts payable). Is there any BAPI available to create outgoing invoice?
    Thanks in advance,
    Sai.

    BAPI_ACC_DOCUMENT_POST try with this.
    see for sample code in this thread : What is exact BAPI for FB01 transaction......
    Reward points if useful
    Madhavi

  • Which BAPI meets my req. for creation of Pur Order - PO??

    Hi Experts,
    User enters a Sales Order on the selection screen, say Order_1.
    So, my requirement is to create the Purchase Order - PO, by pulling the data of Order_1.
    1 - I need to focus the to populate the Order Customer # into PO's HEADER TEXT
    2 - After pulling the Order line items, I need to do small manipulation to them & then, I need to create them as line items of creating PO.
    So, pls. let me know that, Which BAPI is good/correct for me to create a PO.
    I did F4 in SE37 for PO , but found amny!!
    thanq

    Hi,
    You can take help of this code.
    DATA : po_header LIKE bapiekkoc,
           po_items LIKE bapiekpoc OCCURS 0 WITH HEADER LINE,
           po_item_schedules like bapieket occurs 0 with header line,
           wa_po_add_header TYPE bapiekkoa,
           return LIKE bapireturn OCCURS 0 WITH HEADER LINE,
           pno like bapiekko-po_number.
    *POPULATE ITEM DATA.
    CLEAR po_items.
    REFRESH po_items.
    po_items-po_item = '00010'.
    po_items-material = '0000000000000G0001'.
    po_items-pur_mat = 'G0001'.
    po_items-short_text = 'PO created by HIRAL'.
    po_items-net_price = '10'.
    po_items-plant = '0001'.
    *po_items-ACCTASSCAT = ' '.
    po_items-unit = 'EA'.
    APPEND po_items.
    *POPULATE SCHEDULES DATA
    clear po_item_schedules.
    refresh po_item_schedules.
    po_item_schedules-po_item = '00010'.
    po_item_schedules-deliv_date = sy-datum.
    po_item_schedules-quantity = '100'.
    append po_item_schedules.
    *POPULATE HEADER DATA
    po_header-DOC_DATE = SY-DATUM .
    po_header-purch_org = '0001' .
    po_header-pur_group = '001' .
    po_header-vendor = 'ABCD' .
    po_header-doc_type = 'NB'.
    po_header-co_code = '0001'.
    po_header-doc_cat = 'F'.
    po_header-created_by = sy-uname.
    po_header-langu = 'E'.
    po_header-langu_iso = 'EN'.
    CALL FUNCTION 'BAPI_PO_CREATE'
      EXPORTING
        po_header                        = po_header
        PO_HEADER_ADD_DATA               = wa_po_add_header
    *   HEADER_ADD_DATA_RELEVANT         = '1'
    *   PO_ADDRESS                       =
    *   SKIP_ITEMS_WITH_ERROR            = 'X'
    *   ITEM_ADD_DATA_RELEVANT           = '1'
    *   HEADER_TECH_FIELDS               =
    IMPORTING
       PURCHASEORDER                     = pno
       tables
        po_items                         = po_items
    *   PO_ITEM_ADD_DATA                 =
        po_item_schedules                = po_item_schedules
    *    PO_ITEM_ACCOUNT_ASSIGNMENT       =
    *   PO_ITEM_TEXT                     =
       RETURN                            = return
    *   PO_LIMITS                        =
    *   PO_CONTRACT_LIMITS               =                                                                                "
    *   PO_SERVICES                      =                                                                                !                               !
    *   PO_SRV_ACCASS_VALUES             =
    *   PO_SERVICES_TEXT                 =
    *   PO_BUSINESS_PARTNER              =
    *   EXTENSIONIN                      =
    *   POADDRDELIVERY                   =
    LOOP AT return.
        WRITE:/ pno, return-message.
    ENDLOOP.
    Hope this helps to solve your problem.
    Plz reward if useful.
    Thanks,
    Dhanashri.

  • How to know which BAPi is being used for creation of PO in classic scenario

    Hello Experts,
    We are in SRM 7.0 classic scenario.
    How can we know which BAPI is being used in the calssic scenario i.e. How can we know if we are usind BAPI_PO_CREATE or BAPI_PO_CREATE1 for creation of PO?
    Any pointers will be highly appreciated.
    Thank you in advance,
    Thanks & Regards,
    RKS

    Hi RKS
    yesterday BLOG by our SUMMER WANG helps every SRM consultant to debug the PO error
    /people/summer.wang/blog/2010/05/11/trouble-shooting-of-srm-po-transfer-error
    Good work Summer wang !!
    Muthu

  • Bapi for the transaction FBRA, FB08, FB01 anf FD02

    hi,
    can any one please help me with BAPI for the following transaction?
    FBRA - reset cleared items
    FB08 - reversal of the documents
    FB01 - post documents
    FD02 - change customer.
    regards kriti

    Hi
    Copy the below  program in se38 and execute the program and along with the transaction code you need to specify the program name to obtain the program name all you have to do is execute the t-code and go to system--> status and copy the program name from the screen and paste it in the above program.
    tables : tstc,
             tadir,
             modsapt,
             modact,
             trdir,
             tfdir,
             enlfdir,
             sxs_attrt ,
             tstct.
    data :
       jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    parameters : p_tcode like tstc-tcode,
    p_pgmna like tstc-pgmna .
    data wa_tadir type tadir.
    start-of-selection.
      if not p_tcode is initial.
        select single * from tstc where tcode eq p_tcode.
      elseif not p_pgmna is initial.
        tstc-pgmna = p_pgmna.
      endif.
      if sy-subrc eq 0.
        select single * from tadir
        where pgmid = 'R3TR'
        and object = 'PROG'
        and obj_name = tstc-pgmna.
        move : tadir-devclass to v_devclass.
        if sy-subrc ne 0.
          select single * from trdir
          where name = tstc-pgmna.
          if trdir-subc eq 'F'.
            select single * from tfdir
            where pname = tstc-pgmna.
            select single * from enlfdir
            where funcname = tfdir-funcname.
            select single * from tadir
            where pgmid = 'R3TR'
            and object = 'FUGR'
            and obj_name eq enlfdir-area.
            move : tadir-devclass to v_devclass.
          endif.
        endif.
        select * from tadir into table jtab
        where pgmid = 'R3TR'
        and object in ('SMOD', 'SXSD')
        and devclass = v_devclass.
        select single * from tstct
        where sprsl eq sy-langu
        and tcode eq p_tcode.
        format color col_positive intensified off.
        write:/(19) 'Transaction Code - ',
        20(20) p_tcode,
        45(50) tstct-ttext.
        skip.
        if not jtab[] is initial.
          write:/(105) sy-uline.
          format color col_heading intensified on.
          * sorting the internal table
       sort jtab by object.
          data : wf_txt(60) type c,
          wf_smod type i ,
          wf_badi type i ,
          wf_object2(30) type c.
          clear : wf_smod, wf_badi , wf_object2.
          * get the total smod.
          loop at jtab into wa_tadir.
            at first.
              format color col_heading intensified on.
              write:/1 sy-vline,
              2 'Enhancement/ Business Add-in',
              41 sy-vline ,
              42 'Description',
              105 sy-vline.
              write:/(105) sy-uline.
            endat.
            clear wf_txt.
            at new object.
              if wa_tadir-object = 'SMOD'.
                wf_object2 = 'Enhancement' .
              elseif wa_tadir-object = 'SXSD'.
                wf_object2 = ' Business Add-in'.
              endif.
              format color col_group intensified on.
              write:/1 sy-vline,
              2 wf_object2,
              105 sy-vline.
            endat.
            case wa_tadir-object.
              when 'SMOD'.
                wf_smod = wf_smod + 1.
                select single modtext into wf_txt
                from modsapt
                where sprsl = sy-langu
                and name = wa_tadir-obj_name.
                format color col_normal intensified off.
              when 'SXSD'.
                * for badis
             wf_badi = wf_badi + 1 .
                select single text into wf_txt
                from sxs_attrt
                where sprsl = sy-langu
                and exit_name = wa_tadir-obj_name.
                format color col_normal intensified on.
            endcase.
            write:/1 sy-vline,
            2 wa_tadir-obj_name hotspot on,
            41 sy-vline ,
            42 wf_txt,
            105 sy-vline.
            at end of object.
              write : /(105) sy-uline.
            endat.
          endloop.
          write:/(105) sy-uline.
          skip.
          format color col_total intensified on.
          write:/ 'No.of Exits:' , wf_smod.
          write:/ 'No.of BADis:' , wf_badi.
        else.
          format color col_negative intensified on.
          write:/(105) 'No userexits or BADis exist'.
        endif.
      else.
        format color col_negative intensified on.
        write:/(105) 'Transaction does not exist'.
      endif.
    at line-selection.
      data : wf_object type tadir-object.
      clear wf_object.
      get cursor field field1.
      check field1(8) eq 'WA_TADIR'.
      read table jtab with key obj_name = sy-lisel+1(20).
      move jtab-object to wf_object.
      case wf_object.
        when 'SMOD'.
          set parameter id 'MON' field sy-lisel+1(10).
          call transaction 'SMOD' and skip first screen.
        when 'SXSD'.
          set parameter id 'EXN' field sy-lisel+1(20).
          call transaction 'SE18' and skip first screen.
      endcase.
    Regards
    Pavan

  • BAPI for transaction FB01 with account posting key

    Hi,
    I have to use a BAPI for registering Invoices into the FI module through the FB01 transaction.
    I am trying to use the standard BAPI: BAPI_ACC_DOCUMENT_POST
    The problem is that this BAPI does not manage the account posting key (field BSCHL).
    Could anyone provide help?
    Thank you very much in advance.

    It is happening here in the BAPI
    CALL FUNCTION 'FI_GET_POSTING_KEY'
             EXPORTING
                  i_ktosl       = gs_accit-ktosl
             IMPORTING
                  e_bschs       = ld_bschs
                  e_bschh       = ld_bschh
                  e_umskz       = ld_umskz
             EXCEPTIONS
                  error_message = 1.
    As max pointed out, it is dependent on the transaction key(KTOSL).
    Srinivas

  • Is there any BAPI for BOM creation? which does by RCSBI010 / Batch Input.

    Hi Experts,
    I need to Upload the extracted Excel-file(.txt) for BOM creation, so, pls, let me know that, Is there any BAPI for this purpose. In detail the requirement is that,
    The suggested idea shuld work as like as pgm. RCSBI010
    thanq
    Edited by: Srinivas on Feb 14, 2008 6:18 PM

    Hi Srinivas,
    Try these Function Modules
    CS_BI_BOM_CREATE_BATCH_INPUT   - Create BOM Via Batch Input
    CS_BI_BOM_CREATE_BATCH_INPUT1  - Create BOM Via Batch Input (Corrected Session Handling)
    There are two BAPI's too, which can be used
    ALE_MATERIAL_BOM_GROUP_CREATE
    BAPI_MATERIAL_BOM_GROUP_CREATE - Creation of a material BOM group
    Hoe this helps.
    Edited by: Priyabrata Samanta on Feb 15, 2008 3:56 AM

Maybe you are looking for

  • Spinning Beach Ball of Death

    I'm always geting the Spinning Beach Ball of Death, yet instead of it being from having heavy stuff open or not enough RAM, it's as simple as coming out of a screen saver, or clicking a forum button on a browser that can cause it. It doesn't stop, in

  • Custom style classes

    hi all, Is it possible to create some custom style classes and assign them to styleClass property of some components? And if it possible, where to place those custom classes and how to use them? I've tried without success. Regards, Bassam

  • Unable to select an outcome in human task

    Folks, I’ve been trying to get a simple human task to work but as of yet I am unable to. I’ve followed the instructions in the BPEL Process Manager Developer’s Guide (10.1.3) and am using the “Auto Generate Simple Task Form” to create the display. I

  • Songs not transfering from itunes to ipod

    I use limewire to downlod music, there is a limewire folder on my itunes source tab, but when I connect my ipod, it only transfers what is in the other folders. Do I have to change a setting or something? I see all of the songs there, just can't get

  • "View Pdf After Exporting" Moves Acrobat to Background

    Wow, even this forum is buggy. I just lost my entire post because the "server wasn't responding". That'll teach me to copy and paste my post into a text file before hitting the Post Message button. Here goes again: I've tried getting an answer for th