Create quotation based on notification

Hello All,
Can any one tell me hwo to create quotation based on notification.
I know the BAPI's BAPI_QUOTATION_CREATEFROMDATA2 has to be used to create quotation
i get diffrent errors like
1) in sufficient parameters
2) Sales document  was not changed
I don't know what these error means and How to solve it.
Here is my code
data: ls_quotation_header  type bapisdhd1,
      ls_quotation_headerx type bapisdhd1x,
      lt_items             type table of bapisditm,
      lt_itemsx            type table of bapisditmx,
      lt_partners          type table of bapiparnr,
      ls_partner           type bapiparnr,
      ls_item              type bapisditm,
      lt_return            type table of bapiret2,
      ls_return            type bapiret2,
      ls_itemx             type bapisditmx,
      ls_diadr             type diadr,
      lv_parnr             type ihpa-parnr.
ls_quotation_header-sales_org = '1000'.
ls_quotation_header-distr_chan = '10'.
ls_quotation_header-division = '20'.
ls_quotation_header-doc_type = 'AS'.
ls_quotation_header-ref_1_s = '63693'.
lv_parnr = ls_quotation_header-ref_1_s.
ls_quotation_headerx-notif_no = '000350000002'.
*ls_quotation_header-SALES_GRP = 'SOG'.
*ls_quotation_header-SALES_ORG = '0001'.
*ls_quotation_header-DOC_TYPE
*PURCH_DATE
ls_quotation_headerx-sales_org = 'X'.
ls_quotation_headerx-distr_chan = 'X'.
ls_quotation_headerx-division = 'X'.
ls_quotation_headerx-doc_type = 'X'.
ls_quotation_headerx-ref_1_s = 'X'.
ls_quotation_headerx-notif_no = 'X'.
*ls_quotation_header-SALES_GRP = 'X'.
*ls_quotation_header-SALES_ORG = 'X'.
*ls_quotation_header-DOC_TYPE
call function 'CONVERSION_EXIT_ALPHA_INPUT'
  exporting
    input  = lv_parnr
  importing
    output = lv_parnr.
break-point.
call function 'PM_PARTNER_READ_MASTER_DATA'
  exporting
    parnr                  = lv_parnr
    nrart                  = 'KU'
  importing
    diadr_wa               = ls_diadr
  exceptions
    no_valid_parnr         = 1
    no_valid_parnr_today   = 2
    no_authority           = 3
    parvw_and_nrart_inital = 4
    others                 = 5.
if sy-subrc <> 0.
  message id sy-msgid type sy-msgty number sy-msgno
          with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
elseif sy-subrc = 0.
  move-corresponding ls_diadr to ls_partner .
  append ls_partner to lt_partners.
endif.
ls_partner-partn_role = 'AG'.
ls_partner-partn_numb = lv_parnr.
append ls_partner to lt_partners.
*ls_item-hg_lv_item = 5.
*ls_item-material = 31999.
*ls_item-sales_unit = 'LE'.
*ls_item-item_categ = 'ZEQU'.
*APPEND ls_item TO lt_items.
*ls_itemx-hg_lv_item = 'X'.
*ls_itemx-material = 'X'.
*ls_itemx-sales_unit = 'X'.
*ls_itemx-item_categ = 'X'.
*APPEND ls_itemx TO lt_itemsx.
call function 'BAPI_QUOTATION_CREATEFROMDATA2'
  exporting
*   SALESDOCUMENTIN                =
    quotation_header_in            = ls_quotation_header
   quotation_header_inx           = ls_quotation_headerx
*   SENDER                         =
*   BINARY_RELATIONSHIPTYPE        = ' '
*   INT_NUMBER_ASSIGNMENT          = ' '
*   BEHAVE_WHEN_ERROR              = ' '
*   LOGIC_SWITCH                   =
*   TESTRUN                        =
*   CONVERT                        = ' '
* IMPORTING
*   SALESDOCUMENT                  =
  tables
   return                         =  lt_return
   quotation_items_in             =  lt_items
   quotation_items_inx            =  lt_itemsx
    quotation_partners             = lt_partners
*   QUOTATION_SCHEDULES_IN         =
*   QUOTATION_SCHEDULES_INX        =
*   QUOTATION_CONDITIONS_IN        =
*   QUOTATION_CONDITIONS_INX       =
*   QUOTATION_CFGS_REF             =
*   QUOTATION_CFGS_INST            =
*   QUOTATION_CFGS_PART_OF         =
*   QUOTATION_CFGS_VALUE           =
*   QUOTATION_CFGS_BLOB            =
*   QUOTATION_CFGS_VK              =
*   QUOTATION_CFGS_REFINST         =
*   QUOTATION_KEYS                 =
*   QUOTATION_TEXT                 =
*   EXTENSIONIN                    =
*   PARTNERADDRESSES               =
regards,
Lisa

In the meantime we have found the solution to this problem. 
The objectkey must contain the notification number (12 digits):
<b>METHODS</b>
000001  HEADER     CREATETONOTIF  %00000000001000010000188
000001  OPERATION  CREATE         %000000000010010
000001             SAVE           %00000000001
Kind regards,
Lieselot

Similar Messages

  • Create order based upon notification in NWBC / Portal

    Dear experts,
    How to create a maintenance order based upon a notification, using the POWL for notifications ?
    I am using NWBC and would like to create a maintenance order, based upon a notification put in process.
    In R/3, this works fine using transaction IW22 / IW28 and all info from the noticiation is copied in the new order.
    How can I get the same functionality using the role SAP_BPR_MAINTENANCE_TECH_12 ?
    Kind regards,
    Dirk

    Dirk,
       You should be able to select the Notification number from the POWL overview list and choose the "Create Order" push button on the Tollbar (along with display notification, change notification etc).
      What i have noticed is that once you are inside the notification from the Portal application, the create Order push button or functionality doesn't seem to exists. This is probably incomplete functionality taking into consideration the standard IW22 transaction /Or a  Bug  and maybe you could raise a OSS Note for the same.
    Regards
    Narasimhan

  • How to create an order based on Notification through BAPI_ALM_ORDER_MAINTAIN

    Hi
    I need to create an order based on the notification no. This is manually can be done using the Standard T.Code IW34.I am using BAPI_ALM_ORDER_MAINTAIN to create an order based on Notification. I am getting the below message( which is success message)
    Order %00000000001 saved with number 40001258
    BAPI control was ended
    Though order is created it not assigned to notification No. I am using ref key as '%00000000001' and also I tried with '%0000000000140232323' where 40232323 is notification No.
    And if I checked in order the notification No is assigned to order as '%00000000001'. And when I check back the Notification, the order is not assigned to Notification No. How to assign the created order no to Notification No.
    Code is attached for Ref.
    Now the problem is the order is not assigned to notification no. Is there any FM or BAPI to do the same fucntionality..!
    Regards,
    Amar

    Hello Amarnadh,
    Keng Haw Soon is right, object key should always have the client like 010.
    In your code you were passing it without the client.
    Pass like below and it will work.
    ls_methods-objectkey = '%00000000001000040232323'.
    Regards,
    Thanga

  • Problem with assigning Quotation number to notification number

    Hi Experts,
    I have a requirement where when a Quotation number is created using IW52 transaction it should get assigned to notification number. The problem am facing is as  below.
    1) As you all know QMEL is the header table for Notification number, we have added a custom field ZZ_VBELN of type KDAUF to QMEL tabel.
    2) When i try to create Quotation number without clicking on the SAVE button Quotation number is getting assigned to notification number. This Quotation number is saved in VBELN field of QMEL.
    3) However when i click on SAVE button after creating Quotation number, the quotation number is moved to ZZ_VBELN field as a result Quotation number is not getting assigned to notification number.
    My question why this is happening?  In what way i should approach to solve this problem?
    Thanks
    Balu

    when you press the save button the strcture of notification number not there ,
    when you press the save button that time find user exit and pass this values to standard strcture..
    use this exit , it may be usefull
    IWOC0001            Create PM/SM notification: Determine reference object

  • Create quotation from DP81

    Hello Experts,
    I run DP81for creating quotation from the sales pricing which comes from the planned cost of my project.
    Dynamic items are created based on the activity type. Eg: Junior consultant - 100 hrs - $10000,
    Senior Consultant-100hrs-$20000
    When I convert the dynamic items to quotation, each dynamic items are converted to each quotation line item.
    I dont want this to happen because I am going to send quotation to my customer as services. Eg: Line item 1 - Implementation service - $30,000. I want all the dynamic items aggregated to one quotation line item.
    How to do this? I have tried with "individual quantity not checked". I have selected Activity type as the characteristics.
    Any thoughts would be great for me.
    Regards
    Srinivasan Desingh

    Hello all,
    To achieve this,
    1. Check the check box - 'Product' in the DIP profile characteristics.
    2. Configure the pricing in the item category of the service level material as statistical.
    This will aggregate all the dynamic items into your Service level material in the sales order/contract and shows the value in the service level material.
    Regards
    Srinivasan Desingh

  • Location Based Push Notifications in notification hub in wp8

    I'm basically trying to replicate what's being demonstrated at http://channel9.msdn.com/Shows/Cloud+Cover/Episode-118-Location-based-Push-Notifications-with-Windows-Azure-Notification-Hubs.
    It's a good demo by Elio Damaggio, but it doesn't cover all of the code that he's used. I'd really like the sample code for this demonstration but it doesn't appear to be available, and I can't find any tutorials or code examples for using location
    based push notifications. Just wondering if anyone can knows where I can find a tutorial or code sample?

    Hi Rob,
    Thanks for posing!
    Sorry to said, the code sample didn't publish for us currently. However, I suggest you could follow Elio's ideas to code. Firstly ,he create Notification Hubs on azure and implement it in his windows phone 8 application ( http://www.windowsazure.com/en-us/documentation/articles/notification-hubs-windows-phone-get-started/)
    . Secondly, he used the geolocator class (
    http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.geolocation.geolocator )  in his project to get current location.
    And then he register Notification Hubs and convey the current location variables to Bing API. I think you could pay attention to how to use Notification Hubs tags and geolocator class in this code sample.
    Please try it.
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Creating Quotation directly in ISA

    Hi,
    We are using ECO 5 on ECC.
    Currently in ISA when creating a Quotation, first an Inquiry is created and then somebody has to convert the Inquiry to a Quotation. My question is can we setup ISA to create Quotations directly or  "with reference to" an Inquiry (without any customer support people looking at an Inquiry and creating a Quotation).
    Thank in advance,
    Rajiv.

    Paul,
    Thanks for the reply. The way it is in ECO is -
    - The web user creates a 'Quotation' in ECO but in SAP it actually creates an Inquiry.
    - The employee of the client then review the Inquiry and creates a Quotation based on the Inquiry, using  "Create with reference to" .
    - After this the web user is able to view the Quotation and save it as an Order.
    I want to eliminate the second step. by any of the below options (if these are possible)-
    - Directly be able to create an Quotation by ECO.
    - Have an action so that as soon as an Inquiry is created it converts it to a Quotation. (My functional knowledge is limited, more of a web guy).
    - execute a BAPI in ECO which would do the conversion.
    here is some revelent help -
    http://help.sap.com/saphelp_crm40/helpdata/en/ac/94cd9532cea440baae9ba7fffe6375/frameset.htm
    Thanks
    Rajiv

  • How to create event based process chains

    Hi All,
    I would like to know about event based process chains. In connection to this, could you please answer the following queries,
    1. How to create events
    2. How to link created event to the process chain in the same BI or BW system and as well as from  
        externel BI system.
    3. How link one process chain with other process chain (i.e, After completion of one process chain, it
        should trigger other dependent process chain)
    Thanks and Regards,
    Kotesh.

    1). Doubt regarding first question.
    For example, i would like to create time based event (it should be trigger daily at specified time),
    where we have to maintain scheduling options while creating event.
    When i checked SM62 there i found only two options a). Event name and b). Description.
    Could please send any doucument link if you have.
    Ans : You can use function modules like "BP_EVENT_RAISE" in a program and schedule the program to trigger.
    2). For externel BIW system also same procedure we need to follow or any difference.
    Ans : Externally you need to trigger the same event.
    3). i found dependent process chain also had scheduling options as direct scheduling insted of start using meta chain or API. As you said dependent process chain should be mata chain. it seems dependent process chain may be Meta chain or Direct scheduilg.
    Ans : Its your choice how you want to schedule it.You can either make that dependent chain a metachain or schedule it separately.
    I found at the end of first process chain they kept one process like Raise event and second process chain connected with the help of raise event process event name. If you have any idea about this process could explain a bit more.
    Ans : May be they are raising the event in the main chain and triggering the dependent chain using this event.
    But Metachain is preferred for such thing.Though it does similar thing.
    Hope this helps.

  • Error while creating https based web clipping portlet

    Please help me if any one has created https based web clipping portlet. I'm getting the following error when https url is used during clipping :
    An exception has occurred : oracle.portal.wcs.transport.http.HttpTransportException WCS-510 -- HTTP connection failed to URL https://google.com by method get
    Please click "Cancel" or "Back" in the above panel (if present) to retry. Otherwise, please try to click "Back" (from the browser) to go back to the Oracle Portal page to restart.
    both are not working
    Steps performed :
    1) Added proxy settings in provider.xml
    2) Imported certificates from https site into WLS_Portlet key store
    Thanks
    Bikash

    Hi,
    Are you using proxy server? if yes you have to configure it, or it is problem with your provider.xml file. Can you past the code from provider.xml related to proxy setting?
    I have resolved this issue by follow following technique, Look this code from provider.xml
    <proxyInfo class="oracle.portal.provider.v2.ProxyInformation">
    <!-- <httpProxyHost></httpProxyHost>
    <httpProxyPort></httpProxyPort>
    <dontProxyFor>*.mycompany.com</dontProxyFor> -->
    <proxyUseAuth></proxyUseAuth>
    <proxyType></proxyType>
    <proxyRealm></proxyRealm>
    <proxyUseGlobal></proxyUseGlobal>
    <proxyUser></proxyUser>
    </proxyInfo>
    commented first three tags and removed value from remaining tags.
    Just try with that, Hope this will solve your problem
    Muhammad Nasir

  • How to create Formula based value field in COPA

    Hi,
    I want to know how to create formula based  value field in COPA
    My Requirement is i want to collect some value in formula based value field and want to use in copa allocation cycle as a tracing
    factor.
    anybody give some light on the same topic or requirement ?
    Thanks
    Nilesh R

    The key figure you are creating in KE2K is not a value field, i.e. you can't post to it and you can't use it in a report. It is a caluculated value that can be used only in assessment and top-down-distribution.
    In Ke2K, enter a name for your key figure, then click on the the white sheet button to create it. Now the formular area is open for input. Input your formular (e.g. VV001 + VV002 - VV003 .... where VVXXX are the technical names of value fields).
    Now click the "check formuar"-button. Then save.
    Before you can use the key figure in assessment, execute TC KEUG.
    Now the key figure is available as any value field in the tracing factor selection of your assessment cycle.
    I hope this made it clearer.
    Regards
    Nikolas

  • Creating  idocs based on invoice number ocurrences

    Hi ,
    I want  to create idocs based on invoice numbers .
    Lets say i have a file coming in from sender system
    Invoice1 material customer value
    Invoice1 materail1 ..........
    imvoice2 material2.....
    invoice2 material1.....
    invoice1 material3..
    Invoice3. material4....
    So for Invoice1 only one Idoc should be created  similarly for invoice 2 which is ocurring twice in the file
    only 1 idoc  should be created
    Let me know how to achieve this ..  by UDF , or by split by value
    please help
    thnx
    Chirdip

    Hi,
      Change the IDOC occurance to 0-unbounded.Export the xsd change the occurance and import it to external definition.
    Map Like below:
    invoice number--removecontext--sort--splitbyvalue(valuechange)--IDOC
    other fields you need to map like below.
    invoice number--removecontext--sortbykey--SplibyValue(Each)---IDOC fields
    source field----removecontext------
    Regards,
    Prakasu.M

  • Creating Graph based on runtime conditions

    Hi,
    Right now i am able to create Graphs based on Views. But my requirement is that, if i click on certain component, i should be able to crate another graph at runtime which will display information based on the Clicked Component of original graph.
    Any help will be appreciated.
    Thanks

    Hi,
    I think the options are
    - create a second graph and hide it at runtime
    - create the graph on the fly in a managed bean, wich is quite a bit of code to write, that is justified if the "generated" graph is different (e.g. different model data) for each master selection.
    The first approach should be doable by detecting the selected information on the master graph and the query the detail iterator accordingly + displaying it.
    The second approach is a deep dive into the graph model APIs because you will have to code this all manually. Note that we don't have documentation for this approach yet
    Frank

  • Problem Creating VirtualProviders Based on the DTP

    Problem Creating VirtualProviders Based on the Data Transfer Process .
    (1) I have created an Data Source(extract structure and extractor) on SYS1. Tested the extractor. It returns data as desired.
    (2) Then I replicated this Data Source to SYS2.
    (3) In SYS1 I created InfoCube(VirtualProvider based on data transfer process for direct access) .
    Till this point I have no issues .
    (4) But after that I am not able to "Create Data Transfer Process"  for this Virtual Infoprovider . When I try to create DTP the DTP type available for selection is "Scheduled" where as per the documentation I need to create DTP of DTP type "DTP for Direct Access".This DTP type I donot see.
    Is it a problem with the BW configuration or some user error.Any suggestions which may help would be realy appreciated.
    Thanks & Regards,
    priyadarshi

    Corrected some typo in my earlier update...
    Problem Creating VirtualProviders Based on the Data Transfer Process .
    (1) I have created an Data Source(extract structure and extractor) on SYS1. Tested the extractor. It returns data as desired.
    (2) Then I replicated this Data Source to SYS2.
    (3) In SYS2 I created InfoCube(VirtualProvider based on data transfer process for direct access) .
    Till this point I have no issues .
    (4) But after that I am not able to "Create Data Transfer Process" for this Virtual Infoprovider . When I try to create DTP the DTP type available for selection is "Standard(Scheduled)" where as per the documentation I need to create DTP of DTP type "DTP for Direct Access".This DTP type I donot see.
    Is it a problem with the BW configuration or some user error.Any suggestions which may help would be realy appreciated.
    Thanks & Regards,
    priyadarshi

  • Creating Cube based on 0FIGL_O02

    Hi Gurus,
         I installed 0FIGL_O02 (General Ledger: Line Item) ODS from Business Content and fetching data using 0FI_GL_4 data source. In 0FIGL_O02 has document level data.
         If I create Z infocube based on 0FIGL_O02 what are the complexities are there?  Will I lose any important data in summaries InfoCube?
         Is it feasible to create Cube based on 0FIGL_O02?
         If I create Multicube base on Z infocube which is based on 0FIGL_O02 for archiving purpose then is it feasible?
         any suggestion ?
         Thanks in advance…

    Vir
    You could create ZInfo cube and you don't loose any summaraizzed data.
    Since you are using line items Yes it is good idea to creat cube based on 0FIGL_O02
    Why do you want to create Multicube for archiving you could directly archive from basic cubes.
    Hope this helps
    Thnaks
    Sat

  • Create form based on existing row : advice from specialists

    hello,
    i've coded a "create form" based on a row selected by the user.
    this create form displays the same information as the selected row (except for the primary key which is a sequence trigger-calculated) the user can then modify any field and then commit the creation. It's quicker for tables with many columns since the user will override only several fields instead of setting every field one by one.
    I've done it this way :
    1) creation of a createCustomMethod() in my ViewObject implementation class and published it in the client interface.
    2) drag and drop the method as a command button on the selection list page
    3) set the action of the command button to the navigation case value to open the create form when the button is clicked.
    the code of the createCustomMethod() is the following
    public void createCustomMethod() {       
    Row currentRow = this.getCurrentRow();
    Row newRow = this.createRow();
    newRow.setAttribute("Attribute1",currentRow.getAttribute("Attribute1"));
    newRow.setAttribute("Attribute2",currentRow.getAttribute("Attribute2"));
    /* more initialization code here */
    this.insertRow(newRow);
    this.setCurrentRow(newRow);
    it works fine but as i'm knew to ADF BC is this a good solution ? are there any drawbacks to it ?
    thanks
    -regards

    what's the advantage of exposing it in the application module rather than in the view object ?
    Message was edited by:
    user562278
    i've tried implementing the method in the application module (i had to call the findViewObject() now) but the "Row currentRow = vo.getCurrentRow();" instruction throws a NPE.

Maybe you are looking for

  • Need help on Conditional Formating

    Hi All, I have hierearchy as Region to Series and Series to Model. I have created report with following fields Actual Sales, Objective Sales, % of Objective by Region. My requirement is i need to draw a line 100% Objective in chart and need to show t

  • Problem sending data with HTTPS  using client authentication.

    Hi, I�m tryingto send a message to a secure server using for this client certificate, apparently if I make a GET of "/" (server root) , everything works fine (authentication, and data received), from the moment that I try to ways send data to the "/p

  • Change States in component from main view

    The scenario like this: The main view includes many component views. On my main view there have a radio button to choice different role type, for example: admin and user. For different role have different views. But they don't have big difference. My

  • In BD87  T /c  is it possible to control user based in Comp code...?

    In BD87  T /c  is it possible to control user based in Comp code...? Thanks Mahi

  • Preview opens blank jpg over vnc

    Hello and Happy Thanksgiving to everyone. I am using VNC to access my iMac from a Windows 7 machine.  When I open a .jpg in Preview, remotely, I get a blank Preview window (except for the file name at the top and the various icons, i.e., "Previous,"