KEPM Data Upload with BAPI

Dear sirs:
I have to build a data upload program for transaction KEPM (Edit Planning Data), using the BAPI BAPI_COPAPLANNING_POSTDATA. Does anyone have a sample.
Thanks for your help.
Best regards,
Dairo

<b>FYI</b>
FU BAPI_COPAPLANNING_POSTDATA
Text
Write CO-PA Planning data
Functionality
You use this method to return planning data from Profitability Analysis back into the system. This overwrites existing planning data in the system (or, more precisely, the delta value between the old and new values is determined and updated as a line item).
You typically call up this method after reading planning data with the GetData method and making changes to it. To import the changed data back into the system, you fill the parameters SELECTEDFIELDS and SELECTION with data in the same way as you called up GetData. When data is being written, these parameters determine how the delta value between the planning data to be imported and the old planning data in the system is determined: firstly, the old planning data in the system is read in accordance with the values for the parameters SELECTEDFIELDS and SELECTION, and then the delta for the data to be imported is created.
The data to be posted is imported using the table DATA. Since this table is also used to read data with the GetData method, it should also be populated accordingly when data is imported. See also the documentation for the GetData method and for the parameter DATA for this method.
Warning: Under certain circumstances, data that is not imported but is already present in the system as an old value are canceled in this process.
If, for example, products A1 and A2 from plan version 001 are selected in the selection criterion SELECTION but table DATA only contains planning data for product A1, the planning data for A2 that is in version 001 and already in the system is canceled.
Parameters
OPERATINGCONCERN
TYPEOFPROFITANALYSIS
TESTRUN
SELECTEDFIELDS
SELECTION
DATA
RETURN
Exceptions
Function Group
KE_BAPI_COPAPLANNING
Thanks
SK

Similar Messages

  • Data upload with stock catogories

    Hi experts,
    Can we upload the stock with their respective stock catogories through LSMW? Or through any other upload program?
    Please advice

    Hi,
    yes its possible through LSMW .
    Or  you can upload with BDC/CATT.
    regards

  • ISU Business Partner Master data Upload using BAPI?

    Hi Experts,
    I used BAPI "BAPI_ISUPARTNER_CREATEFROMDATA" to upload ISU Business Partner master data.
    This BPAI is not uploading the following topics:
    1. Communication Address like Telephone,extension, email and etc., are not uploading.
    2. Middle name, nick name etc, the field which are under the Expand symbol not uploading.
    3. Reference customer also not uploading.
    strctures what I used are:
    for communication : TELEFONDATANONADDRESS, E_MAILDATANONADDRESS
    general data : BAPIISUBPD
    Reference customer: BAPIBPPARA-MUSTER_KUN
    I am passing all the data but not uploading some of the field values (above) using that BAPI.
    Could you please let me know the solution?
    Please help me out!
    Thanks in advance.
    sekhar

    Sekhar:
    Try with below details:
    for communication : BAPIISUBPA & BAPIISUBPAX.
    general data : BAPIISUBPD & BAPIISUBPDX
    Reference customer: BAPIISUBPA-BP_EXT & BAPIISUBPDX-BP_EXT
    Thanks,
    Murali.

  • Customer Master data upload with Ref Customer Master

    Hi all,
    I want to extend all the Customer master records of a particular Sales area to another new Sales area (copy from one sales area to other). What is the easiest way to do this?
    Am trying to copy by giving referrence number, but still i had to give all the relavant data which i suppose shold not be. So plz guide me the best way to copy the master data of all the customers.
    Thanks in advance.
    Cheers,
    Anil.

    We have had the similar issue. I simply downloaded the customer master sales area data and replaced the distribution channel with new one in excel then division and recorded the LSMW for this only thing u have to be careful is while extending u have to use the current customer number as refernce which has to be recorded. this entire process till execution took about 30 mins + upload time.
    It works perfect.

  • Data upload with LSMW in special period

    Dear Experts,
    I encountered an error message saying "Posting period 003 2007 is not open" when i tried to upload data with LSMW in specail period 13 2007.
    The system kept on picking period 03 even i changed it to 13. I changed many times and press enter enter...error.
    Finally i changed the posting date from "31/03/2007" to "31/12/2007", this time entry posted successfuly.
    1.) Can anyone explains to me why I only can post these entries in period 13 2007 with posting date 31.12.2007?
    I2.) Is that possible to post in period 13 2007 with posting date 31.03.2007 because my company's Statutory Audit is April 06 - Mar07 and we prefer to post with posting date 31/03/2007?
    Thanks.
    Jack

    Hi jack,
    Actually you are facing the error in case of postings rather than LSMW.
    Every company has it's fiscal year (accounting year), like April-March.And at the start of every month we have to open the period.
    For any kind of such problems,
    OBY6 - Check the fiscal year
    OX18  - Remove the assignments of plant & company code
    OMSY - Make month as current month ( like sept or octomber)
    OX18 -Make assignment of plant & company code
    OMWD - Give 0001 to plant
    Also for periods opening and closing follow the following:-
    IMG->Financial Accounting->Financial Accouting Global Settings->Document->Posting Periods->Open and close posting periods.
    OB52
    MM posting periods:
    Logistics->Materials management->Material master->Other->Close period
    MMPV (to open current period)
    Logistics->Materials management->Material master->Other->Post to prev.period
    MMRV (shows what is open)
    Also check OB52 for type M
    Thanks & Regards,
    Savita Nevade.

  • Vendor data upload with CREMAS

    hello folks,
    I am trying to upload the data for Vendor master with the use of idoc method....
    Here every field is getting populated properly
    i am getting the problem with only one screen ie the <b>credit info no</b> field in XK03 control data screen---->reference data block
    can anyone guide me what is the exact problem where i am going wrong?

    any help plz

  • Upload time data with BAPI

    Hi guys,
    anyone now how to use some of the following bapis?
    BAPI_PTMGREXTREMSPEC_INSERT
    BAPI_PTMGREXTREMSPEC_INSWACT
    BAPI_PTMGREXTREMSPEC_INSWCOST
    i need to know how to USE this bapis, i dont know how to insert data using this BAPI, wich parameters are needed.
    tks in advance

    Hi,
    following is from the documentation:
    <b> Import parameters
    AttendanceAbsence</b>
    Attendance/absence
    <b> Description</b>
    For more information on the individual parameter fields, see the data element documentation in the ABAP Dictionary.
    The following data is required:
    Logical system of the original document (Field EXTSYSTEM)
    External application (Field EXTAPPLICATION)
    Document number (Field EXTDOCUMENTNO)
    Personnel number (Field EMPLOYEENUMBER)
    From date (Field FROM_DATE)
    To date (Field TO_DATE)
    Attendance or absence type (Field ABS_ATT_TYPE)
    Start time (Field START_TIME) and End time (Field END_TIME) or
    Attendance/absence hours (Field ABS_ATT_HOURS) 
    What is your problem?
    Regards
    Bernd

  • BAPI-VT01 BAPI_SHIPMENT_CREATE DATA UPLOAD

    Dear All,
    Can anybody send    step by step of data upload in TCODE vt01
    bY using BAPI -BAPI_SHIPMENT_CREATE with soms basic datas.
    Mohamed

    Hi,
    Check this link,
    bapi_shipment_create
    and see this function module IDOC_INPUT_SHIPMENT_CHANGE
    Regards,
    Raghava Channooru

  • I want to upload material master (MM01) using LSMW with BAPI method

    I want to upload material master (MM01) using LSMW with BAPI method and also later on I may need to change the updated data.
    Which business object and Method I should use so that i can do both.
    Thanks
    kumar n

    Hi,
    The business object is BUS1001.
    Thanks,
    Murali

  • Hello !  pls give some ti[ps how to use bapi's for data uploading?

    hello !
      pls give some ti[ps how to use bapi's for data uploading?
    regards,
    Arjun

    Hi,
    See the below report extract:
    where it_data is having uploaded data.
    LOOP AT<b> it_data</b> INTO wa_data.
        line_count = sy-tabix.
        "Date Validation
        CONCATENATE wa_data-uplft_date4(4) wa_data-uplft_date2(2) wa_data-uplft_date+0(2)
        INTO wa_data-uplft_date.
        "READ TABLE it_ekko INTO wa_ekko WITH KEY lifnr = wa_data-vendor.
        LOOP AT it_ekko_temp INTO wa_ekko_temp WHERE lifnr = wa_data-vendor.
          IF wa_ekko_temp-kdatb <= wa_data-uplft_date AND wa_ekko_temp-kdate >= wa_data-uplft_date.
            MOVE-CORRESPONDING wa_ekko_temp TO wa_ekko.
            APPEND wa_ekko TO it_ekko.
          ENDIF.
        ENDLOOP.
        "IF sy-subrc = 0 AND wa_ekko-kdatb <= wa_data-uplft_date AND wa_ekko-kdate >= wa_data-uplft_date.
        LOOP AT it_ekko INTO wa_ekko.
          wa_data_header-pstng_date = wa_data-uplft_date.
          wa_data_header-doc_date = sy-datum.
          wa_data_header-bill_of_lading = wa_data-bill_of_lad.
          wa_data_header-ref_doc_no = wa_data-del_no.
          CONCATENATE wa_data-header_text1 '-'
                      wa_data-header_text2 '-'
                      wa_data-header_text3 '-'
                      wa_data-header_text4
                      into wa_data_header-HEADER_TXT.
          IF wa_data-indicator = 'Y'.
            wa_data_item-material = '000000000000200568'.
          ELSE.
            wa_data_item-material = '000000000000200566'.
          ENDIF.
          LOOP AT it_ekpo INTO wa_ekpo WHERE ebeln = wa_ekko-ebeln AND matnr = wa_data_item-material.
            "Collect Item Level Data
            wa_data_item-plant = '1000'.
            wa_data_item-stge_loc = '1001'.
            wa_data_item-move_type = '101'.
            wa_data_item-vendor = wa_data-vendor.
            wa_data-qnty = wa_data-qnty / 1000.
            wa_data_item-entry_qnt = wa_data-qnty.
            wa_data_item-po_pr_qnt = wa_data-qnty.
            wa_data_item-entry_uom = 'KL'.
            wa_data_item-entry_uom_iso = 'KL'.
            wa_data_item-orderpr_un = 'KL'.
            wa_data_item-orderpr_un_iso = 'KL'.
            wa_data_item-no_more_gr = 'X'.
            wa_data_item-po_number = wa_ekpo-ebeln.
            wa_data_item-po_item = wa_ekpo-ebelp.
            wa_data_item-unload_pt = wa_data-unload_pt.
            wa_data_item-mvt_ind = 'B'.
            APPEND wa_data_item TO it_data_item.
            CLEAR wa_data_item.
          ENDLOOP.
          CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
            EXPORTING
              goodsmvt_header = wa_data_header
              goodsmvt_code   = goodsmvt_code
              testrun         = 'X'
            TABLES
              goodsmvt_item   = it_data_item
              return          = return.
          READ TABLE return INTO wa_return WITH KEY type = 'S'.
          IF sy-subrc <> 0.
            DESCRIBE TABLE return LINES sy-tfill.
            IF sy-tfill = 0.
              CALL FUNCTION <b>'BAPI_GOODSMVT_CREATE'</b>   
            EXPORTING
                  goodsmvt_header = wa_data_header
                  goodsmvt_code   = goodsmvt_code
                  testrun         = ' '
                TABLES
                  goodsmvt_item   = it_data_item
                  return          = return.
              CALL FUNCTION <b>'BAPI_TRANSACTION_COMMIT'</b>
               EXPORTING
                 WAIT          = 'X'
              IMPORTING
                RETURN        =
            ENDIF.
          ENDIF.
          LOOP AT return INTO wa_return.
            WRITE: 'Messsage TYPE  ', wa_return-type,
                  /,'ID  ', wa_return-id,
                  /, 'Number  ', wa_return-number,
                  /, 'Message  ', wa_return-message,
                  /, 'Long Text  ', wa_return-message_v1,
                                    wa_return-message_v2,
                                    wa_return-message_v3,
                                    wa_return-message_v4,
                 /, 'Failed at line', line_count.
          ENDLOOP.
          CLEAR: wa_ekko, wa_ekpo, wa_data, it_data_item[], wa_data_header.
        ENDLOOP.
    Reward if useful!

  • Data Migration from 11i to R12 Global - Open POs,lines, receipts & on hand upload, Is it possible to do the onhand qty upload with over riding of all receipts which uploaded against Open PO lines?

    Hi Friends,
    We are in a phase of data migration from 11i to R12 
    I was discussed with client & they wants extraction of all open POs which was generated after 01 Jan 2014 to till date in 11i.
    Condition for open POs is PO qty-received qty=>0
    critical Example for open PO is :PO no: 10 has 4 lines, 3lines full qty has been received & for 1 line partial qty(say 50 out of 100) received.
    in this case he wants in R12 uploading as PO no:10 should entered as open PO with all 4lines & 3 lines complete receipt should be done, for 4th line partial qty i.e 50 should be received.
    the question is if we upload on hand qty first, then open POs & receipts, it will increase the onhand qty in new system(mismatch of on hand qty's 11i to R12) 
    Is it possible to do the onhand qty upload with over riding of all receipts which uploaded against Open PO lines.
    Or Please advice best solution.
    Thanks & Regards
    Giri

    adetoye50 wrote:
    Dear Contacts Journal Support Team,
    FYI, this is a user to user support forum.  You are NOT addressing Apple here.
    Honestly, I doubt anyone is really going to take the time to read the novel you have written.

  • Runtime Error while uploading data using a BAPI

    Hi ALL,
        I am trying to upload duties for PO items using BAPI from a excel sheet.In this BAPI I am saving the data into a z table(Customizing table, maintenance only by cust., not SAP import).The data is getting saved into the table and it shows the data uploaded successfully message also,but when I scroll up I see RUN time error,althogh the data is getting saved.
            I have seen in the st22 and it shows the following information.
    Internal error: Invalid page number.                                                                               
    What happened?                                                                               
    The current ABAP program had to be terminated because the                    
    ABAP processor detected an internal system error.                            
    The current ABAP program "ZFI_UPD_BOE_UPLOAD" had to be terminated because the
    ABAP                                                                        
    processor discovered an invalid system state.                                
        My functional consultants opinion is after data getting saved it comes into me23n's  condition tab.He has done it many times.But for one PO it is not showing.
        I checked the upload program.In upload program a BAPI is written which simply takes the data from a excelsheet and saves into the z table.
      My query is whether we can show the data of a z table into standard tocde?

    Thanks Lakshman!
               I debug the program.There is no BDC used update.In this program after taking the data from excel sheet one internal table is prepared and this internal table is directly used to insert data into z table.This is the last code which executes.
      INSERT zmmpoamend FROM TABLE t_zmmpo_amend_tab.
      IF sy-subrc EQ '0'.
        MESSAGE 'Data Upload Successfully completed' TYPE 'S'.
      ELSE.
        ROLLBACK WORK.
        MESSAGE 'Data Upload failed ' TYPE 'E'.
      ENDIF.
      CLEAR t_zmmpo_amend_tab.
      REFRESH t_zmmpo_amend_tab.
         Is it possible to configure z table using SPRO tcode,such that this z tables data will go to standard table and then we can see it in the standard tcode?
    I am not sure but it's just a guess.

  • Save variant configuration data with BAPI or FM

    Hi experts,
    I created a PP production order by using a configured material.
    I can see internal object number in table AFPO-CUOBJ.
    I'd like to change and save a value of characteristics by using ABAP.
    Could you tell me it if there is a BAPI or FM to save values of characteristics in variant configuraion?
    BR,

    you can chnage the variant configuration data using below bapi with strcture    order_cfgs_value      =
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          salesdocument        
          order_header_in       =
          order_header_inx      =
           TABLES
          return                = return_lt
          order_item_in         =
          order_item_inx        =
          partners              =
          partnerchanges        =
          partneraddresses      =
          order_cfgs_ref        =
          order_cfgs_inst       =
          order_cfgs_part_of    =
          order_cfgs_value      =

  • LSMW - Upload purchase contracts (ME31K) with BAPI

    I'm trying to upload some contracts from the legacy to SAP ECC 6.0 using LSMW.
    I've already worked with Direct Input and Batch Input record with LSMW but never with BAPI.
    I found business object BUS2014 / Message Type - PURCONTRACT_CREATE but I don't know how to continue the process. Could you give me some suggestions?
    Thanks in advance,
    Guiza

    Hi,
    I saw some examples but I'm still with the same problem. At step 4 Maintain Structure Relations I have this error: "No target structures could be found - Message no. /SAPDMC/LSMW_OBJ_030001".
    What could be?
    Step 1 - Business Object Method -
    BUS2014
    Method: Create
    Step 2 - I've create 2 structures
    Header and Item
    Step 3 - I associate the fields that I want to upload.
    I don't know but could the error be because the Idoc Inbound Processing?
    Thanks,
    Guiza

  • Data Uploads done with one User Id not visible to other users in SPM

    Hi,
    Data uploads were successfully carried out by one of the SPM users. However, other users (with different user id) are not able to see anything in the Data Upload Summary screen.
    Is there a restriction on the visibility of Data Upload Summary for data uploads carried out with one User id to other users in SPM? A similar behaviour is observed for other screens within the Data upload workbench.
    Incase this is not the expected behaviour, it would be great if you could please provide pointers to possible reasons for this.
    Just for your information, all users have been granted same privileges in the SPM application.
    Thanks in advance.
    Regards,
    Ashish Sharma

    Hi Ashish,
    No this is not the expected behavior. We have seen this issue for other customers in the past but the reason has always turned out to be role related.
    Can you ensure that the required SPM roles are assigned to the user who do not see the DM data both in ABAP as well as portal.
    Thanks,
    Divyesh

Maybe you are looking for