Using BAPI to create Personnel Number.

Greetings SAP Gurus,
I have a requirement to create and fill  infotypes 0000, 0001 and 0002 from a legacy system flat file. While searching the forums i have seen a few posts recommending the use of HR_MAINTAIN_MASTERDATA. Will this actually create a Personnel Number? If not are there any HR BAPIs that will?
My plan right now is to run a BDC for infotype 0000, use HR_MAINTAIN_MASTERDATA to fill most of the Infotype 0001, use BAPI_PERSDATA_CREATE to fill most of Infotype 0002 and finally use HR_INFOTYPE_OPERATION to fill in any fields not covered by the previous BAPI and FM. Is there a better way to approach this problem?
Thanks for your time and knowledge,
Alex ODell

there is a number range object for personnel numbers, transaction PA04.
the ranges can be set externally or internally. if you do not provide a personnel number with the hiring action (subtype of infotype 0000) the pernr is taken from the internal part of the number range.
it is recommanded to create the action type with infotype order 0000 -> 0002 -> 0001 because there are fields ENAME and SNAME in infotype 0001filled automatically from infotype 0002.
infotype 0003 is created automatically in the background as well as objects P (Person) and CP (Central Person) with relations in infotypes 1000 and 1001.

Similar Messages

  • How to create invoice using bapi  base on delivery number with example

    hi,
    Pl give me one example to create invoice using bapi base on delivery number (PGI).

    Use this code
    * Pass the delivery no to the FM to create the invoice
          wa_vbsk-smart = u2018Fu2019.
            wa_komfk-vbeln = nast-objky. u201CuF0DF-----delivery number
            APPEND wa_komfk TO it_komfk.
            CLEAR wa_komfk.
    *    To fill the message structure
    *        l_wa_error-vbeln_vl = nast-objky. " Delivery No.
    *        l_wa_error-fkart = wa_ztab-bil_doc_type." Billing Doc type
            CALL FUNCTION 'RV_INVOICE_CREATE'
                    EXPORTING
    *                 delivery_date             = 0
                     invoice_date              = v_date  u201C<- date
    *                 invoice_type              = '    '
    *                 pricing_date              = 0
                     vbsk_i                    = wa_vbsk
                     with_posting              = u2018Du2019
    *                 select_date               = 0
                     i_no_vblog                = ' '
                     i_analyze_mode            = ' '
                     id_utasy                  = ' '
                     id_utswl                  = ' '
                     id_utsnl                  = ' '
                     id_no_enqueue             = ' '
                     id_new_cancellation       = ' '
    **             IMPORTING
    *               VBSK_E                    =
    *               OD_BAD_DATA               =
    *               DET_REBATE                =
                    TABLES
                      xkomfk                    = it_komfk
                      xkomv                     = it_komv
                      xthead                    = it_thead
                      xvbfs                     = it_vbfs
                      xvbpa                     = it_vbpa
                      xvbrk                     = it_xvbrk
                      xvbrp                     = it_vbrp
                      xvbss                     = it_vbss
    *               XKOMFKGN                  =
    *               XKOMFKKO                  =

  • Create material master using BAPI .(Mat. internal number range)

    I would like to create the material using BAPI. (Material is internal number range).
    I am trying to create the material using BAPI  BAPI_MATERIAL_SAVEDATA, but material number is required field as per BAPI documentation .
    Can you please suggest me the function modules or BAPI to load materials which are in internal number range.
    Regards
    Badari

    Hi ,
    Use FM 'MATERIAL_NUMBER_GET_NEXT' to get next available material #.
    You can use that material # in BAPI 'BAPI_MATERIAL_SAVEDATA'.
    Cheers,
    Vikram

  • Error while using BAPI  to create Goods Receipt Document

    Hello All,
        While using the bapi BAPI_GOODSMVT_CREATE to create  Goods receipt document ,the following error is encountered:-
    Error Message:FOR OBJECT XABBELEGNR,NUMBER RANGE INTERVAL DOES NOT EXIST OM36.
    Do we need to create a number range object ??If yes,how and where to create ?
    Thanks,
    Deepti.

    Hi Deepti!
    There is only a valid interval missing, not the whole object.
    Maintenance can be done via transaction SNRO, enter your object XABBELEGNR in entry screen. (Alternatively use transaction OMJ6).
    Push button 'Number Ranges' and 'Change Intervals'. Here you can define an interval.
    Regards,
    Christian

  • How to use Bapi for creating sales order

    Dear All,
    I am facing problem in creating Sales orders using BAPI.
    Actually I am getting one file as an input and after validating the contents in the file i am preparing an internal table which has 6 fields - Customer number,PO Number,Material Number,Quantity,Price,Unit of measure.
    Now  my doubt is that while using BAPI_SALESORDER_CREATEFROMDAT2 , I am not getting how to pass PO Number and Customer number.
    Please Help.
    Regards,
    Shweta

    Hi shweta upadhyay
    I have gone through you are post i have done some coding for creating sales order using bapi , I think it is helpful for you.
    *& Report  YOBJ_BAPI_SALESORDER
    *& REPORT : CREATING SALES ORDER USING STANDARD BAPI
    *& AUTHOR : S.PAVAN KUMAR INUMARTHY
    REPORT  YOBJ_BAPI_SALESORDER.
    DATA : ORDER_HEADER_IN LIKE STANDARD TABLE OF BAPISDHD1 WITH HEADER LINE.
    DATA : ORDER_ITEMS_IN LIKE STANDARD TABLE OF BAPISDITM WITH HEADER LINE.
    DATA : ORDER_PARTNERS LIKE STANDARD TABLE OF BAPIPARNR WITH HEADER LINE.
    DATA : RETURN TYPE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE.
    DATA : SALESDOCUMENT LIKE BAPIVBELN-VBELN.
    *APPENDING VALUES FOR HEADER.
    ORDER_HEADER_IN-DOC_TYPE = 'TA'.
    ORDER_HEADER_IN-SALES_ORG = '1000'.
    ORDER_HEADER_IN-DISTR_CHAN = '10'.
    ORDER_HEADER_IN-DIVISION = '00'.
    ORDER_HEADER_IN-SALES_GRP = '130'.
    ORDER_HEADER_IN-SALES_OFF = '1030'.
    APPEND ORDER_HEADER_IN.
    *APPENDING VALUES FOR ITEM
    ORDER_ITEMS_IN-MATERIAL = 'M-13'.
    ORDER_ITEMS_IN-PLANT = '1000'.
    ORDER_ITEMS_IN-SALES_UNIT = 'ST'.
    ORDER_ITEMS_IN-DIVISION = '07'.
    ORDER_ITEMS_IN-GROSS_WGHT = '28000'.
    ORDER_ITEMS_IN-NET_WEIGHT = '28000'.
    ORDER_ITEMS_IN-UNTOF_WGHT = 'KG'.
    ORDER_ITEMS_IN-VOLUME = '0.780'.
    ORDER_ITEMS_IN-VOLUNIT = 'M3'.
    APPEND ORDER_ITEMS_IN.
    *APPENDING VALUES FOR PARTNER
    ORDER_PARTNERS-PARTN_ROLE = 'AG'.
    ORDER_PARTNERS-PARTN_NUMB = '0000001000'.
    ORDER_PARTNERS-COUNTRY = 'DE'.
    ORDER_PARTNERS-TRANSPZONE = 'D000080000'.
    APPEND ORDER_PARTNERS.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
      EXPORTING
    *   SALESDOCUMENTIN               =
        ORDER_HEADER_IN               = ORDER_HEADER_IN
    *   ORDER_HEADER_INX              =
    *   SENDER                        =
    *   BINARY_RELATIONSHIPTYPE       =
    *   INT_NUMBER_ASSIGNMENT         =
    *   BEHAVE_WHEN_ERROR             =
    *   LOGIC_SWITCH                  =
    *   TESTRUN                       =
    *   CONVERT                       = ' '
    IMPORTING
       SALESDOCUMENT                  = SALESDOCUMENT
      TABLES
       RETURN                         = RETURN
       ORDER_ITEMS_IN                 = ORDER_ITEMS_IN
    *   ORDER_ITEMS_INX               =
        ORDER_PARTNERS                = ORDER_PARTNERS
    *   ORDER_SCHEDULES_IN            =
    *   ORDER_SCHEDULES_INX           =
    *   ORDER_CONDITIONS_IN           =
    *   ORDER_CONDITIONS_INX          =
    *   ORDER_CFGS_REF                =
    *   ORDER_CFGS_INST               =
    *   ORDER_CFGS_PART_OF            =
    *   ORDER_CFGS_VALUE              =
    *   ORDER_CFGS_BLOB               =
    *   ORDER_CFGS_VK                 =
    *   ORDER_CFGS_REFINST            =
    *   ORDER_CCARD                   =
    *   ORDER_TEXT                    =
    *   ORDER_KEYS                    =
    *   EXTENSIONIN                   =
    *   PARTNERADDRESSES              =
              IF SY-SUBRC = 0.
              CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    *           EXPORTING
    *             WAIT          =
    *           IMPORTING
    *             RETURN        =
               ENDIF.
    WRITE : 'SALES ORDER IS :', SALESDOCUMENT.
    This will be very helpful for you .
    this one is the correct answer I have tried it and I am posting it for you.
    Message was edited by: pavan inumarthy

  • Service order creation using bapi with repair order number

    Hi experts,
    Pls suggest me a BAPI to create a service order for those repair orders where a PGR has been done(for return delivery type : LR).
    The plant should be 0260 with storage location wh01 and item category ZRRE
    Creation of a service order with repair order type SM03 is not allowed in iw31.
    thanks and regards,
    Vijayb.

    Hi prakash,
    Thank u for the BAPI
    But an error is being displayed saying that the REFURBISHMENT ORDERS CANNOT BE PROCESSED USING BAPI.
    ERROR DURING PROCESSING OF BAPI METHODS.
    This is while u pass the order type as either ZM03 or SM01or SM02 or SM03.
    pls help me on that.
    thanks and regards,
    Vijayb.

  • Problem using BAPI to create Service Confirmation in CRM

    Good afternoon all.
    I have raised this is CRM forum too, just thought it best to ask the broader ABAP community the question too.
    We are encountering a problem using a BAPI to create a transaction in CRM, specifically:
    I am trying to create a Service Confirmation (BUS2000117) in a CRM system using the BAPI BAPI_BUSPROCESSND_CREATEMULTI.
    The BAPI succeeds in creating the header of the transaction, but I cannot make the BAPI create any other data in the transaction such as partners or items.
    Just want to be sure that I am not being foolish...has anyone succeeded in using this BAPI to create an error-free Service Confirmation?
    Regards
    Nick

    I am going to pop this thread into General ABAP forum too.
    Nick

  • How to use SNRO to create daily number range?

    Dear all,
    I would like to know how to use SNRO to create a daily number range.
    We would like to have the following sequence. The first 8 digits are date and the last 2 digits are number sequence. Each day, the last 2 digits will start from 01 again. i.e. <8-digits date><2-digit sequence>
    For example, today is 22 May 2006,
    2006052201
    2006052202
    2006052203
    Tomorrow will have sequence like this:
    2006052301
    2006052302
    2006052303
    Thanks!

    Thomas,
    I don't there is a automated way of doing as the dates do NOT follow a numbering sequence. What you can do is to create a number range for getting the last two digits every day and manually concatenate the date with the serial number.
    However, as you have to reset the counter every day that might be a issue.
    Regards,
    Ravi

  • Using BAPI to create users across all Clients and R/3 Systems

    Hi everyone,
    I'm currently writing a program where I'm using a BAPI to create multiple new users via central user admin (SU01) and assigning Roles to these users.
    My objective is to create these new users in all clients of all R/3 systems using RFC. At the moment, in SM59, our DEV environment is set up as "DEV", QA as "TST" and PRD as "PRD". When I use syntax:
    CALL FUNCTION 'BAPI_USER_CREATE1' DESTINATION 'TST' the system presents a logon screen to login to TST system. Can this logon be made automatic i.e. without this screen prompt?
    Also, I can't create the users in all clients of 'TST'. Our test system has 5 clients...how do I create the users in all clients of TST automatically?
    Your help will be greatly appreciated.
    Thanks.
    Sougata.

    Try to see the SAP HELP:
    RFC logon to target system (remote logon)
    RFC logon within an R/3 system can be successfully undertaken using the same user ID even if the logon is to take place in a different client.
    In principle, all necessary logon data for a particular RFC destination (language, user, client, and password) are used when an RFC logs on to the target system.
    Typically the password field (for a particular user) must be maintained when an RFC communicates with other clients or user IDs.
    If one of the fields language, client or user is not maintained for the designated RFC destination, default values are taken from the system environment (system table).
    Tips:
    With RFC communication within a single R/3 system with the same client and user the logon fields do not have to be maintained. Password entry is also unnecessary in this special case.
    If an RFC logon in online mode is unsuccessful, an RFC logon window is displayed (not during background processing) where you can logon to the target system online at runtime.
    The default values for the RFC logon screen fields are as follows:
    Client
    The standard value of the target system application server is used. This value is read from the target server's "login/system_client" profile parameter.
    User
    The system inserts the user ID of the current user in this field.
    Language
    Information from the RFC destination is used to fill the language field. If the language field has not been maintained in the destination, the current language of the calling system is inserted.
    The RFC logon window does not appear if the initial function module call of the RFC destination originates from the system-specific function group 'SRFC'. The function modules RFC_PING and RFC_SYSTEM_INFO belong to this group among others.
    If you would like to have an RFC logon window displayed regardless, you must end RFC communication to that particular RFC destination after the call using the function module 'RFC_CONNECTION_CLOSE'.
    Be aware that no logon screen is usually offered when using trusted/trusting systems.
    Documentation to authorization checks in the RFC environment can be found in RFC authorization concept.
    Max

  • How to create personnel number as FI Customer in system?

    Dear Community,
       I am new in HR, and have requirements to create from HR personnel an FI customers fro internal billing. Can you guide me how to do it in HR?
    Best regards, Artem

    HI,
    For HR personnel no. you need to go PA40 tcode  here you can update all the fields.
    Then one personnel number will be generate.
    If you want to create for this perner to vendor account you need to FK01.
    Thanks and Regards,
    Revathi.

  • Customer creation using BAPI with given customer number

    Hi All,
    Can we create the customer with our own customer number using the BAPI - BAPI_CUSTOMER_CREATEFROMDATA1.
    Generally SAP Creates its own number using number range objects,but i want to create customer with our own specified number.
    I found the BADI - CUSTOMER_ADD_DATA for XD01,but it is not working for BAPI.
    Please give me the solutions.
    Regards,
    Srinivas.

    Thanks once again.
    The interface is like this NON-SAP (Front-end)
                              Mercator
                              SAP (Back-end).
    and the volume of Date is more than 20,000 a day and mercator will put into the 'Q'.i do not think the data flow in front-end and back-end is authentic.
    and lot of business logic is involved in these three systems.
    I found the BADI for this,but it is not working for the BAPI.Please suggest any thing for BAPI - BAPI_CUSTOMER_CREATEFROMDATA1.
    Regards,
    Srinivas.

  • Using BAPI to create RFQ in MM-Purchase ?

    Dear friends,
    Do you have any idea to create the RFQ via BAPI or Function module? If you have, please tell me. Thanks a lot!
    Best regards,
    Brian Liu

    I guess there is no BAPI For MM RFQ ,You have to use BDC to update or create.
    Thank you
    Seshu

  • Problem when using BAPI to create return order

    Hi All,
    I need urgent Information.
    I am using BAPI_CUSTOMERRETURN_CREATE and BAPI_CUSTOMERRETURN_CHANGE to create and change quantity of return order. In both cases I am getting the result that quantity value is not getting updated.
    are these BAPIs are correct to fulfil my requirement, if yes could you please clarify?
    other wise, can I use BAPI_SALESORDER_CREATEFROMDAT2 and BAPI_SALESORDER_CHANGE?
    and could you please some details about quantity change in Outbound delivery?
    I am using BAPI_OUTB_DELIVERY_CHANGE for this

    Hi
    <u>You need to do exeute a BAPI_TRANSACTION_COMMIT after the succesful execution of both the function modules BAPI_CUSTOMERRETURN_CREATE and BAPI_CUSTOMERRETURN_CHANGE.</u>
    <b>I mean, please insert CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'  function module in the program, after each function module call</b>. 
    Hope this will help.
    Please reward suitable points.
    Regards
    - Atul

  • Using BAPI to create sales order

    Hi
      i use this BAPI 'BAPI_SALESORDER_CREATEBOS' to create SO, and This BAPI is with SAP E&C solution.
    it is similar to BAPI_SALESORDER_CREATEFROMDAT2. and when i call this BAPI, it give the error 'only quantity 1 ST are permitted (item 000010)'. This because the material i use is service material and with unit 'ST' and only 1. it means one project i sell.
    The partial code is as below.
      i_orderitemsin-itm_number = '000010'.
      i_orderitemsin-material = it_sdmaster-MATNR.
      I_ORDERITEMSIN-SHORT_TEXT = it_sdmaster-ARKTX.
      I_ORDERITEMSIN-TARGET_QU = 'ST '.
      I_ORDERITEMSIN-SALES_UNIT = 'ST '.
      I_ORDERITEMSIN-TARGET_QTY = '1.000'.
      I_ORDERITEMSIN-TARGET_QU = 'ST '.
      I_ORDERITEMSIN-TRG_QTY_NO = 1.
      I_ORDERITEMSIN-TRGQTY_DEN = 1.
      i_orderitemsin-pckg_no = v_package.
      APPEND i_orderitemsin .
      clear i_orderitemsin .
    You see, i have input the unit(ST) and quantity(1). tks for ur advice.

    I think you dont need to pass data in the fields TRG_QTY_NO and TRGQTY_DEN.
    Refer the data element documentation of the above fields.
    -Kiran

  • Problem in Sales order create using BAPI with reference to quotation

    Hi,
    I am creating a sales order from Quotation using BAPI /AFS/BAPI_SALESORD_CREATEFDATA.
    The Sale order is getting created and the document flow is updated. When i check the status of quotation it is "OPEN".
    Ideally when a sale order is created in VA01 with reference to a quotation and if all items are added in the order from quotation, then the status of the quotation must be "Complete".
    When i use the BAPI, the status of the quotation is sill "Open". Has anyone faced this issue?
    Even if anyone has faced this issue with BAPI_SALESORDER_CREATEFROMDAT2, please let me know...
    Regards

    Hi RV,
    I am using BAPI  to create order reference to contracts. I am facing same issue. Its not updating document flow (vbfa-plmin field). After creating orders I am forcing to update plmin field in vbfa. This worked fine. But now status in reference document not updating properly. I saw your thread. It looks like similar issue. I saw your comments "Customization was not maintained properly for the Order types ". Please can you explain little bit more about your solution. It will helps us lot.
    Thanks,
    srini

Maybe you are looking for