Unable to create Service PR using BAPI_PR_CREATE

Hi Guys,
I am creating PRs using BAPI_PR_CREATE. I am able to create all type of PRs except Service.
I have tried passing additional data to structures servicelines, servicelinesx, serviceaccount, serviceaccountx, but still i could not able to create service PR successfully. Getting error message like 'In case of account assignmernt, please enter acc. assignment data for item'.
Please let me know what data I need to pass to get service PR created.
Thx in advance.

Hi,
In order to create the Service PR you need to pass the list of services in a way similar to that in which they appear in the ESLL table i.e with the combination of the package number and the subpackage number and that option is not there in this bapi so either you need to activate the properties of the business function LOG_MM_CI_2 using the T-Code SFW5 or you need to use the
BAPI:-       'BAPI_REQUISITION_CREATE'
In which need to pass the following tables:-
REQUISITION_ITEMS
REQUISITION_SERVICES
REQUISITION_SRV_ACCASS_VALUES
The First table will contain the data relevant to the items that will be created in the PR.
The Second table will contain the Header and Item level data for each item defined in the previous table
Say for Example:-
Header Data You need to pass a Pack Number that could be any number I passed 1234 and then the sub package number will be the pack number + 1. Other fields that we need to pass are ext_line line_no and short_text.
ITEM DATA   Here we need to pass the subpackNumber from the header data as the pack number
and the sub pack number will be left blank here at the item level and the other details like the qty and gross price and the activity number and others will be passed here.
So if there are multiple services( Say 5 ) in the single line item of a PR you should create a single header data and append that to the table REQUISITION_SERVICES and then you must create or get the item data 5 times one for each service and append all those to the same table   REQUISITION_SERVICES.
Third Table  This table will contain the account assignment data for the line items of the PR.
In Case of any issue do revert back and i will give you the test data.
<removed by moderator>
Regards,
Dev
Message was edited by: Thomas Zloch

Similar Messages

  • How to create SERVICE PR using BAPI_PR_CREATE

    Hi everyone,
    How to create SERVICE PR using BAPI_PR_CREATE
    Regards,
    My Code(it doesn't work,I don't know what's wrong.):
    *& Report  ZWTEST
    REPORT  zwtest.
    DATA: header TYPE bapimereqheader,
          headerx TYPE bapimereqheaderx,
          item LIKE TABLE OF bapimereqitemimp WITH HEADER LINE,
          itemx LIKE TABLE OF bapimereqitemx WITH HEADER LINE,
          account  LIKE TABLE OF bapimereqaccount WITH HEADER LINE,
          accountx LIKE TABLE OF bapimereqaccountx WITH HEADER LINE,
          service LIKE TABLE OF bapi_srv_service_line WITH HEADER LINE,
          servicex LIKE TABLE OF bapi_srv_service_linex WITH HEADER LINE,
          serviceaccount LIKE TABLE OF  bapi_srv_acc_data WITH HEADER LINE,
          serviceaccountx  LIKE TABLE OF bapi_srv_acc_datax WITH HEADER LINE,
          preq_no LIKE  bapimereqheader-preq_no,
          lt_return LIKE TABLE OF bapiret2 WITH HEADER LINE,
          wa_return LIKE bapiret2.
    header-pr_type = 'NB'."订单类型(采购)
    headerx-pr_type = 'X'.
    CLEAR: item.
    item-preq_item = '00010'.
    item-pur_group = '426'."采购组
    item-short_text = '服务类PR'."短文本
    item-plant = '1051'."工厂
    item-matl_group = 'AS07'."物料组
    item-item_cat = '9'."项目类别
    item-acctasscat = 'K'."科目分配类别
    item-pckg_no = '0000000001'."软件包编号
    APPEND item.
    CLEAR: itemx.
    itemx-preq_item = '00010'.
    itemx-preq_itemx = 'X'.
    itemx-pur_group = 'X'."采购组
    itemx-short_text = 'X'."短文本
    itemx-plant = 'X'."工厂
    itemx-matl_group = 'X'."物料组
    itemx-item_cat = 'X'."项目类别
    itemx-acctasscat = 'X'."科目分配类别
    itemx-pckg_no = 'X'."软件包编号
    APPEND  itemx.
    CLEAR: account.
    account-preq_item = '00010'.
    account-serial_no = '01'.
    *account-quantity = '0.955'.
    *account-distr_perc = '95.5'.
    account-gl_account = '4205020000'.
    account-costcenter = '1042000001'.
    *account-co_area = 'CNOC'.
    *account-profit_ctr = '9999999999'.
    APPEND account.
    CLEAR: accountx.
    accountx-preq_item = '00010'.
    accountx-serial_no = '01'.
    accountx-preq_itemx = 'X'.
    accountx-serial_nox = 'X'.
    *accountx-quantity = 'X'.
    *accountx-distr_perc = 'X'.
    accountx-gl_account = 'X'.
    accountx-costcenter = 'X'.
    *accountx-co_area = 'X'.
    *accountx-profit_ctr = 'X'.
    APPEND accountx.
    CLEAR: service.
    service-doc_item = '00010'.
    service-outline = '0000000001'.
    service-srv_line = '0000000010'.
    service-short_text = 'service test'.
    service-quantity = '10.000'.
    service-uom = 'AU'.
    service-gross_price = '10.00'.
    service-currency = 'CNY'.
    *service-matl_group = 'AS07'."物料组
    APPEND service.
    CLEAR: servicex.
    servicex-doc_item = '00010'.
    servicex-outline = '0000000001'.
    servicex-srv_line = '0000000010'.
    servicex-short_text = 'X'.
    servicex-quantity = 'X'.
    servicex-uom = 'X'.
    servicex-gross_price = 'X'.
    servicex-currency = 'X'.
    *servicex-matl_group = 'X'.
    APPEND servicex.
    CLEAR: serviceaccount.
    serviceaccount-doc_item = '00010'.
    serviceaccount-outline = '0000000001'.
    serviceaccount-srv_line = '0000000010'.
    serviceaccount-serial_no = '01'.
    serviceaccount-serial_no_item = '01'.
    serviceaccount-percent = '100'.
    APPEND serviceaccount.
    CLEAR: serviceaccountx.
    serviceaccountx-doc_item = '00010'.
    serviceaccountx-outline = '0000000001'.
    serviceaccountx-srv_line = '0000000010'.
    serviceaccountx-serial_no = '01'.
    serviceaccountx-serial_no_item = 'X'.
    serviceaccountx-percent = 'X'.
    APPEND serviceaccountx.
    CALL FUNCTION 'BAPI_PR_CREATE'
      EXPORTING
        prheader               = header
        prheaderx              = headerx
    *   TESTRUN                =
      IMPORTING
        number                 = preq_no
    *   PRHEADEREXP            =
      TABLES
        return                 = lt_return
        pritem                 = item
        pritemx                = itemx
    *   PRITEMEXP              =
    *   PRITEMSOURCE           =
        praccount              = account
    *   PRACCOUNTPROITSEGMENT  =
        praccountx             = accountx
    *   PRADDRDELIVERY         =
    *   PRITEMTEXT             =
    *   PRHEADERTEXT           =
    *   EXTENSIONIN            =
    *   EXTENSIONOUT           =
    *   PRVERSION              =
    *   PRVERSIONX             =
    *   ALLVERSIONS            =
    *   PRCOMPONENTS           =
    *   PRCOMPONENTSX          =
    *   SERVICEOUTLINE         =
    *   SERVICEOUTLINEX        =
        servicelines           = service
        servicelinesx          = servicex
    *   SERVICELIMIT           =
    *   SERVICELIMITX          =
    *   SERVICECONTRACTLIMITS  =
    *   SERVICECONTRACTLIMITSX =
        serviceaccount         = serviceaccount
        serviceaccountx        = serviceaccountx
    *   SERVICELONGTEXTS       =
    *   SERIALNUMBER           =
    *   SERIALNUMBERX          =
    * 处理错误消息:通过判断消息的类型,来判断BAPI是否成功
    READ TABLE lt_return INTO wa_return WITH KEY type = 'E'.
    IF sy-subrc = 0.
      CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
    ELSE.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
      WRITE: / '成功创建采购申请', preq_no.
    ENDIF.
    LOOP AT lt_return INTO wa_return.
      WRITE: / wa_return-message, wa_return-type, wa_return-id, wa_return-number.
    ENDLOOP.

    see note:
    1950319 - How to create service PR with BAPI_PR_CREATE.pdf

  • Create service PR using BAPI_PR_CREATE

    Hi experts,
    I am trying to create service PR using BAPI_PR_CREATE, though i am a able to create a service PR with account assignment category =  'K'(i.e. cost centre), I am not ble to create PR with acc. assign. category = 'N' (i.e. network).
    It gives me an error saying please entre operation/activity number, when i pass the activity number in the acc. assgn. data structure in the BAPI, it gives an error that the network XXX cannot be assigned with an the activity number.
    As this BAPI is for ME51N, i do not understand why does it ask for an activity number.Can you please help.
    Regards

    Solved Using Item category 9 instead of D

  • Creating service PO using BAPI - Created PO doesnot exist!!!

    Hi,
    I am creating service PO using   BAPI_PO_create. BAPI returns a PO number at the completion of excution. But when i check in ME23N Po does not exist. Niether does it Exist in EKKO/EKPO tables.
    also there is a structure BAPIESKLC in this  BAPI.  Though i know htis a link for account assignment i am not very clear on the fields. Specially  the percenatge field.
    Can someone guid me on This?
    Thanks on advance,
    Shwetha

    Please do check if there are any dumps in the system, after the commit work command.
    For this, you should check transaction code ST22.
    Any dumps ?
    Edited by: Lior Tabib on Jul 13, 2011 9:35 AM
    Edited by: Lior Tabib on Jul 13, 2011 9:35 AM

  • Problem in customer address while creating service notification using IW51

    Hi Experts,
    I am trying to create a BDC recording for creating Service Notification using transaction IW51. I have done the recording as follows. On the First screen I am entering notification type. Then on the next screen I am entering the Sold to party  and its address by clicking on the icon besides it. After that i enter Functional location, equipment, priority and req end date and save it.  When I am running this recording after transferring it to a progam , somehow the address disappears for the newly created notification. I am not able to figure out the reason. Kindly guide me.
    Thanks,
    Sonal

    I assume you have tried this with update mode = 'A'-all and watched it actually work correctly?  May I ask why the BDC instead of BAPI?  Is it because you're creating a new partner?  If so, are you pressing save on that partner creation?

  • WSW0100: Unable to create Service

    Hi,
    I am trying to access a webservice(Location.jws) via a dataservice function(GetLocationResponse.ds)
    The primary objective of the webservice is to post a request to GlobalLocate, a location provider and obtain the user's location co-ordinates.
    On the test browser, I am able to test the webservice both by Test form and Text XML successfully.
    I have created GetLocationResponse.ds as explained in Chp 9 of Sample tutorial 1.
    However, when I execute the GetLocationResponse.ds in testview of DSP for the first time it works fine.
    On subsequent execution,I am encountering the following errors:
    com.bea.ld.wrappers.ws.exceptions.WSWrapperException: {bea-err}WSW0100: Unable to create Service {http://www.openuri.org/}Location of WSDL: http://localhost:7001/Location/controls/Location.jws?WSDL=.
         at com.bea.ld.wrappers.ws.exceptions.WSWrapperException.create(WSWrapperException.java:50)
         at weblogic.xml.query.exceptions.XQueryException.create(XQueryException.java:127)
         at weblogic.xml.query.exceptions.XQueryException.create(XQueryException.java:98)
         at weblogic.xml.query.exceptions.XQueryException.raise(XQueryException.java:575)
         at com.bea.ld.wrappers.ws.JAXRPCWebserviceAdapter.createService(JAXRPCWebserviceAdapter.java:341)
         at com.bea.ld.wrappers.ws.JAXRPCWebserviceAdapter.createNativeOperator(JAXRPCWebserviceAdapter.java:211)
         at weblogic.xml.query.operators.OperatorManager.getNativeOperator(OperatorManager.java:754)
         at com.bea.ld.wrappers.ws.JAXRPCWebserviceIterator.exec(JAXRPCWebserviceIterator.java:120)
         at com.bea.ld.wrappers.ws.JAXRPCWebserviceIterator.fetchNext(JAXRPCWebserviceIterator.java:103)
         at weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:134)
         at weblogic.xml.query.runtime.navigation.ChildPath.fetchNext(ChildPath.java:170)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:151)
         at weblogic.xml.query.runtime.node.Data.fetchNext(Data.java:83)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
         at weblogic.xml.query.runtime.constructor.AtomicElementConstructor.fetchNext(AtomicElementConstructor.java:129)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:151)
         at weblogic.xml.query.runtime.constructor.SuperElementConstructor.getPhase2(SuperElementConstructor.java:388)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.matEverything(PartMatElemConstructor.java:123)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.fetchNext(PartMatElemConstructor.java:197)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:151)
         at weblogic.xml.query.runtime.constructor.SuperElementConstructor.getPhase2(SuperElementConstructor.java:388)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.fetchNext(PartMatElemConstructor.java:229)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
         at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
         at weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:134)
         at weblogic.xml.query.runtime.sequences.Subsequence.fetchNext(Subsequence.java:101)
    Caused by: javax.xml.rpc.JAXRPCException: failed to create service
         at weblogic.webservice.core.rpc.ServiceImpl.getWebService(ServiceImpl.java:123)
         at weblogic.webservice.core.rpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:42)
         at com.bea.ld.wrappers.ws.JAXRPCWebserviceAdapter.createService(JAXRPCWebserviceAdapter.java:298)
         at com.bea.ld.wrappers.ws.JAXRPCWebserviceAdapter.createNativeOperator(JAXRPCWebserviceAdapter.java:211)
         at weblogic.xml.query.operators.OperatorManager.getNativeOperator(OperatorManager.java:754)
         at com.bea.ld.wrappers.ws.JAXRPCWebserviceIterator.exec(JAXRPCWebserviceIterator.java:120)
         at com.bea.ld.wrappers.ws.JAXRPCWebserviceIterator.fetchNext(JAXRPCWebserviceIterator.java:103)
         at weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:134)
         at weblogic.xml.query.runtime.navigation.ChildPath.fetchNext(ChildPath.java:170)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:151)
         at weblogic.xml.query.runtime.node.Data.fetchNext(Data.java:83)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
         at weblogic.xml.query.runtime.constructor.AtomicElementConstructor.fetchNext(AtomicElementConstructor.java:129)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:151)
         at weblogic.xml.query.runtime.constructor.SuperElementConstructor.getPhase2(SuperElementConstructor.java:388)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.matEverything(PartMatElemConstructor.java:123)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.fetchNext(PartMatElemConstructor.java:197)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:151)
         at weblogic.xml.query.runtime.constructor.SuperElementConstructor.getPhase2(SuperElementConstructor.java:388)
         at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.fetchNext(PartMatElemConstructor.java:229)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
         at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
         at weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:134)
         at weblogic.xml.query.runtime.sequences.Subsequence.fetchNext(Subsequence.java:101)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
         at weblogic.xml.query.runtime.querycide.QueryAssassin.fetchNext(QueryAssassin.java:54)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:151)
         at weblogic.xml.query.runtime.qname.InsertNamespaces.fetchNext(InsertNamespaces.java:238)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
         at weblogic.xml.query.runtime.core.QueryIterator.fetchNext(QueryIterator.java:127)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
         at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
    Could you please help me resolve this?
    Thanks
    Vidya

    Sounds like the webservice is not available.
    Is http://localhost:7001/Location/controls/Location.jws?WSDL= the correct URL?
    Try putting http://localhost:7001/Location/controls/Location.jws?WSDL= in a browser and seeing if you get the wsdl back.

  • Hi Folks,   I have a problem with OBIEE EM, There in Enterprise Manager i am unable to navigate into the options like when i clik on any Tab it is not working and even  i am unable to create a report using analysis.

    Hi Folks,
      I have a problem with OBIEE EM, There in Enterprise Manager i am unable to navigate into the options like when i clik on any Tab it is not working and even  i am unable to create a report using analysis.
    Thanks in advance

    i have also tried that but no use can u give me any other way.......

  • Unable to create web reports using WAD in BI 7.0

    We are unable to create web reports using WAD in BI 7.0 because of the missing BI metadata. Please take a look at the error below .

    didnt see the error??

  • I need your help how to create service plan using programm

    Hello everybody
    I met some difficulities when writing a programm which is used to create service plan.
    I used the function module 'crm_order_maintain'.
    Can you tell me how to set the parameters:
       IT_SERVICEPLAN_I
       IT_SERVICEPLAN_IE
    The two parameters is used as cycle data.
    I'm waiting for your help.
    If you have any idea,please apply to my message .Thank you very much. ^ ^

    Hi,
    I think there is standard way of creating service plans using actions..
    The standard method used is CREATE_ORDER_SRVPLAN.
    Regards,
    PePe

  • *Unable to create Service Entry Sheet.*

    Hi,
    Iu2019m trying to create service entry sheet for a service PO but all the item level fields in ML81N screen are appearing in display mode (non-editable) also I cannot see the u201CService Selectionu201D button. So Iu2019m unable to insert/select the service detail and cannot create the entry sheet. If I use the menu path Edit->Service Selection, still cannot adopt services and system gets busy for a substantial period and eventually timed out.
    Please helpu2026
    Iu2019m using ECC 6.0
    Thanks, Pratap

    Service PO: Intangible good that is the subject of business activity and that can be performed internally or procured externally (outsourced).
    -     Services are regarded as being consumed at the time of their performance. They cannot be stored or transported.
    -     Examples of services include construction work, janitorial/cleaning services, and legal services.
    Steps involved in Service PO:
    1.     Define Organizational Status for Service Categories, in IMG - MM - External Services Management.
    2.     Define Service Category, Enter Service Category, Org. Service Category, External Number Assignment
    Without Validation, Acct. Category Reference & Service Category Description.
    3.     Define Number Ranges for Service Category.
    4.   Create Service Master Record (AC03), SAP Menu u2013 Logistics u2013 MM u2013 Service Master, Enter Service Category,
          Base unit of measure, Mat/srv.grp (007 u2013 Service), Division, Valuation class u2013 3200 & Service type.  
    5.     Create Service PO with Acct. Assignment u2013 Cost Center (K), Item Category u2013 D, Material Short Text, Mat. Group, Plant, Entry for Services in Item Level i.e. Service No., Quantity & Gross Price u2013 Save.
    6.     Maintain Service Entry Sheet u2013 ML81N in SAP Menu u2013 Logistics u2013 MM choose PO in ML81N edit and save.
    7.     Then do MIRO from PO reference u2013 Service Entry sheet.
    8.     Collective Release of Service Entry Sheet u2013 ML85
    Organizational Status for Service Category: The organization status indicates the areas in which service master records are used.
    Service Category: The service category is the most important criterion for structuring service master records. It provides a default value for the valuation classes. Service master records can be assigned to number ranges on the basis of the service category.

  • Unable to create service user Installation

    Hi am unable to create PIAPPLUSER service user.Am installing NW2004s on AIX.
    Its using the BAPI_USER_CREATE1 to create the user, everything is successful but at last it gets a message RFC connection closed.Is this some thing to do with SLD? I created the user PIAPPLUSER manually, but then also its giving RFC connection closed...Please help me...Answers will be greatly rewarded...
    INFO       2007-04-19 12:31:08 [iaxxrfcimp.cpp:478]
               CAbRfcImpl::checkSysInfoSAP
    Version 700  of remote SAP System QPI accepted.
    INFO       2007-04-19 12:31:08 [iaxxrfcimp.cpp:594]
               CAbRfcImpl::setFunction
    Setting new application function BAPI_USER_CREATE1.
    INFO       2007-04-19 12:31:08 [iaxxrfcimp.cpp:1017]
               CAbRfcImpl::callLibraryFunction
    Generating interface for remote function.
    INFO       2007-04-19 12:31:09 [iaxxrfcimp.cpp:1065]
               CAbRfcImpl::performFunctionCall
    Function call was successful.
    INFO       2007-04-19 12:31:09 [iaxxrfcimp.cpp:924]
               CAbRfcImpl::getRfcInterfaceSAP
    Function interface generated successfully.
    INFO       2007-04-19 12:31:10 [iaxxrfcimp.cpp:926]
               CAbRfcImpl::getRfcInterfaceSAP
    Technical properties of function set successfully.
    INFO       2007-04-19 12:31:10 [iaxxrfcfls.cpp:107]
               CRfcFuncRep::insFuncIf
    Information for application function BAPI_USER_CREATE1 copied to local Repository.
    INFO       2007-04-19 12:31:10 [iaxxrfcimp.cpp:622]
               CAbRfcImpl::setFunction
    Function module BAPI_USER_CREATE1 set successfully.
    INFO       2007-04-19 12:31:10 [iaxxrfcimp.cpp:1032]
               CAbRfcImpl::callFunction
    Executing function call BAPI_USER_CREATE1.
    INFO       2007-04-19 12:31:10 [iaxxrfcimp.cpp:1065]
               CAbRfcImpl::performFunctionCall
    Function call was successful.
    INFO       2007-04-19 12:31:10 [iaxxbjsco.cpp:561]
               CIaJSCo::disconnect_impl(001:DDIC:EN:tsqa1d03:40:::)
    RFC connection closed.
    ERROR      2007-04-19 12:31:11 [iaxxejsbas.cpp:178]
               EJS_ErrorReporter
    FJS-00003  TypeError: this.getSystemInfo() has no properties (in script NW_Onehost|ind|ind|ind|ind, line 12941: ???)
    ERROR      2007-04-19 12:31:11 [iaxxgenimp.cpp:736]
               showDialog()
    FCO-00011  The step CreateUser with step key |NW_Onehost|ind|ind|ind|ind|0|0|SAP_Software_Features_Configuration|ind|ind|ind|ind|5|0|NW_Usage_Types_Configuration_PI|ind|ind|ind|ind|1|0|GenericNewCreateAbapUser|ind|ind|ind|ind|1|3|CreateUser was executed with status ERROR .

    Hi
    I did that....I created the user manually and assigned the role...Then also its not crossing the step "Creating PIAPPL USER step".If it passes thru this step...am all set to go with my installation...Any help??

  • Creating Service PO using BAPI_PO_CREATE1

    Hi gurus,
    I am trying to create a PO with service lines using BAPI_PO_CREATE1 but am getting the following errror even though i have passed values to the structures POSERVICES POSRVACCESSVALUES and POACCOUNT along with item and header details:
    Please maintain services or limits
    Please suggest what are the basic details that need to be passed to the structures for creating a PO with service lines.

    Hi,
    You need to use Package Number to link the services with the item. Check the tables like ESKN to know how the linking works with your existing data.
    There are lot of posts related to this. Please do a search to get detailed answers. Thanks for your patience!!
    Regards,
    Yogesh

  • Creating service order using BAPI_BUSPROCESSND_CREATEMULTI

    Hi Experts,
    I have a requirement to create a Service order using a BAPI.
    I'm trying to use the BAPI BAPI_BUSPROCESSND_CREATEMULTI. I found some code related to this BAPI on this forum and and I've written my code based on that and while executing it i'm getting a short dump. Could anyone please help me figure out what the problem is.
    My code is as follows:
    data: lv_header_guid type guid_32.
    data: begin of lit_header occurs 0,
          include type BAPIBUS20001_HEADER_INS,
          end of lit_header.
    data: wa_header type BAPIBUS20001_HEADER_INS.
    data: begin of lit_inputfields occurs 0,
          include type BAPIBUS20001_INPUT_FIELDS,
          end of lit_inputfields.
    data: wa_inputfields type BAPIBUS20001_INPUT_FIELDS.
    data: begin of lit_partner occurs 0,
          include type BAPIBUS20001_PARTNER_INS,
          end of lit_partner.
    data: wa_partner type BAPIBUS20001_PARTNER_INS.
    Create Contract header guid
      CALL FUNCTION 'GUID_CREATE'
        IMPORTING
          ev_guid_32 = lv_header_guid.
    Fill orderadm_h
      wa_header-guid         = lv_header_guid.
      wa_header-process_type = 'YSC'.
      APPEND wa_header TO lit_header.
    Fill input fields
      MOVE: lv_header_guid  TO wa_inputfields-ref_guid,
            'A'             TO wa_inputfields-ref_kind,
            '0001'         TO wa_partner-ref_partner_handle,
            'ORDERADM_H'    TO wa_inputfields-objectname,
            'PROCESS_TYPE'  TO wa_inputfields-fieldname.
      APPEND wa_inputfields TO lit_inputfields.
      CLEAR wa_inputfields.
    Fill PARTNER DETAILS
    Sold to Party
      MOVE: lv_header_guid TO wa_partner-ref_guid,
            'A'            TO wa_partner-ref_kind,
            '0001'         TO wa_partner-ref_partner_handle,
            'CRM000'         TO wa_partner-partner_fct,
            '5000000288'    TO wa_partner-partner_no,
            'BP'           TO wa_partner-no_type,
            'BP'           TO wa_partner-display_type,
            'X'        TO wa_partner-mainpartner.
      APPEND wa_partner TO lit_partner.
      CLEAR wa_partner.
    Fill input fields
      MOVE: lv_header_guid TO wa_inputfields-ref_guid,
            'A'      TO wa_inputfields-ref_kind,
            '0001'         TO wa_inputfields-logical_key,
            'PARTNER'     TO wa_inputfields-objectname.
      MOVE  'PARTNER_FCT' TO wa_inputfields-fieldname.
      APPEND wa_inputfields TO lit_inputfields.
      MOVE  'PARTNER_NO' TO wa_inputfields-fieldname.
      APPEND wa_inputfields TO lit_inputfields.
      MOVE  'NO_TYPE' TO wa_inputfields-fieldname.
      APPEND wa_inputfields TO lit_inputfields.
      MOVE  'DISPLAY_TYPE' TO wa_inputfields-fieldname.
      APPEND wa_inputfields TO lit_inputfields.
      CLEAR wa_inputfields.
      CALL FUNCTION 'BAPI_BUSPROCESSND_CREATEMULTI'
        TABLES
          HEADER                  = lit_header
        ITEM                    =
        ACTIVITY                =
        SALES                   =
         PARTNER                 =  lit_partner
        ORGANISATION            =
        SHIPPING                =
        APPOINTMENT             =
        TEXT                    =
        SERVICE_OS              =
        STATUS                  =
         INPUT_FIELDS            =  lit_inputfields
        CREATED_PROCESS         =
        RETURN                  =
        LEAD                    =
        OPPORTUNITY             =
        PRODUCT                 =
        SCHEDULELINE            =
        CUSTOMER_HEAD           =
        CUSTOMER_ITEM           =
        PRICING                 =
        PRICING_ITEM            =
        CONDITION_CREATE        =
        BILLING                 =
        CONFIG_CFG              =
        CONFIG_BLB              =
        CONFIG_INS              =
        CONFIG_PRT              =
        CONFIG_VAL              =
        CONFIG_VK               =
        CONFIG_REF              =
        ADDRESS                 =
        BILLPLAN                =
        BILLPLAN_DATE           =
        EXTENSIONIN             =
        DOCUMENT_FLOW           =
        BATCH                   =
        PRICING_AGR_CRM         =
        FINPROD_ITEM            =
        CANCEL                  =
        CANCEL_IR               =
        PRODUCT_LIST            =
        PRODUCTS                =
        OBJECTS                 =
        PAYPLAN                 =
        PAYPLAN_DATE            =
        CONFIG_FILTER_CFG       =
        CONFIG_FILTER_INS       =
        CONFIG_FILTER_PRT       =
        CONFIG_FILTER_VAL       =
        ACTIVITY_I              =
        EXT_REF                 =
    ENDFUNCTION.
    I'm getting the following dump.
    Runtime Errors         ITAB_ILLEGAL_COMPONENT
    Date and Time          07.09.2006 21:29:03
    Short dump has not been completely stored (too big)
    Short text
    Invalid line component &V2 in "... KEY k1 = v1 ... kn = vn".
    Error analysis
    When the ABAP/4 program "SAPLCRM_BUSPROCESSND_BAPI" attempted to process the
    internal table "HEADER[]"
    with "... KEY k1 = v1 ... kn = vn", a component "HANDLE " was specified
    dynamically as the contents
    of the field "LV_STR_HANDLE". However, the line type "u" of the internal table
    "HEADER[]"
    contains no component "HANDLE ".
    |                                                                         -
    Information on where terminated
    Termination occurred in the ABAP program "SAPLCRM_BUSPROCESSND_BAPI" - in
    "SET_RETURN_VALUES".
    The main program was "RS_TESTFRAME_CALL ".
    In the source code you have the termination point in line 36
    of the (Include) program "LCRM_BUSPROCESSND_BAPIF80".
    Source Code Extract
    Line
    SourceCde
    6
    7
          text
    8
    9
         -->P_LT_ORDERADM_H_COM  text
    10
         -->P_LT_ORDERADM_I_COM  text
    11
         <--P_HEADER  text
    12
         <--P_ITEM  text
    13
    14
    form set_return_values  tables  header structure BAPIBUS20001_HEADER_INS
    15
    item structure BAPIBUS20001_item
    16
    using   p_lt_orderadm_h_com type any table
    17
    p_lt_orderadm_i_com  type any table
    18
    19
    20
    data: lv_str_handle type fieldname,
    21
    lv_str_headerhandle type fieldname,
    22
    lv_str_objectid type fieldname.
    23
    24
    25
    field-symbols: <ls_orderadm_h> type crmt_orderadm_h_com,
    26
    <ls_orderadm_i> type crmt_orderadm_i_com,
    27
    <ls_header> type BAPIBUS20001_HEADER_INS,
    28
    <ls_item> type BAPIBUS20001_item.
    29
    30
    31
    lv_str_handle = 'HANDLE'.
    32
    lv_str_headerhandle = 'HEADER_HANDLE'.
    33
    lv_str_objectid = 'OBJECT_ID'.
    34
    35
    loop at p_lt_orderadm_h_com assigning <ls_orderadm_h>.
    >>>>>
    read table header with key (lv_str_handle) = <ls_orderadm_h>-handle
    37
    (lv_str_objectid) = <ls_orderadm_h>-object_id
    38
    assigning <ls_header>.
    39
    if sy-subrc = 0.
    40
    <ls_header>-guid = <ls_orderadm_h>-guid.
    41
    endif.
    42
    endloop.
    |   43|                                                              
    Could anyone please help me with this.
    Thanks,
    Preethi
    Message was edited by: Preethi Sooth

    First off. Debug.
    Put a break point on the line that is generating the short dump and run your code. The ABAP debugger should display before the dump...now....
    The error specifies that the line type of the table HEADER (which is the internal representation of your lit_header table and has line type BAPIBUS20001_HEADER_INS ) doesn't have a field called HANDLE.
    Check if it does (it should have or something is very wrong, and you should report a bug to SAP).
    Check all runtime variables for that command. See if the table has any values in it. Try using your lit_header table with header-line or not.
    Your in a far better position to determine what the error is then me. Right now, I don't have access to a CRM server.
    From my experience that BAPI is a piece of .... It is hard finding functions in CRM that actually do what you want...properly...Try using CRM_ORDER_CREATE (i think it's called like that). Much better, and if you need RFC capability just write a wrapper RFC.
    Message was edited by: João Sousa

  • Account Assignment is not populated while creating service PO using BAPI

    Hi All,
    I am creating a service PO using BAPI_PO_CREATE1 and Its creating PO, But when I go to ME23n and check Account Assignment in Services then Its empty.
    Please help me as I am not able to understand what could be the problem...
    Thanks & Regards,
    Prabhat Pandey

    Thanks for your most valuable answer.
    Regards,
    Prabhat

  • Error: Unable to create socket(While using Mail Adapter in receiver side)

    Hi Experts,
    I have tried the File to Mail scenario. While component monitoring the Sender communication is working fine but the receiver communication is giving error like Unable to create socket. Please help me to solve this error.
    Regards,
    Nutan

    HI,
    before using the mail adapter have you specified all the attributes porperly as well as have setup the SMTP Exchange Server address
    For FAQs about the mail adapter, see SAP Note 856599.
    Please read the below thread, it might be helpful/
    SOAP Receiver   java.io.IOException: unable to create a socket
    Thanks
    Swarup

Maybe you are looking for