[CRM] Check the order after adding line items

As an enhancement, I've created a piece of code that determines the default quantity for an item. On its own, it works as intended.
When creating a new contract based on a template, the same default quantity coding is being executed, thereby - in most cases - adding the quantity of 1 for the items.
Without that coding, a user would have to enter a quantity and press <enter> to confirm. At that moment a couple of checks are being performed on the items, which can result in errors.
The problem is that when the default quantity is filled in for the user, there is no need to press <enter> and so those checks are skipped. Even though there should be an error (at least in the test case), we see nothing.
The default quantity is being called from a CRM event (after creation of an item) and used the CRM_SCHEDLIN_I_MAINTAIN_OW function to change the quantity. After that, control is turned over to the system once again.
Is there any way of forcing the same checks on the order without having to hit the <enter> key?

As an enhancement, I've created a piece of code that determines the default quantity for an item. On its own, it works as intended.
When creating a new contract based on a template, the same default quantity coding is being executed, thereby - in most cases - adding the quantity of 1 for the items.
Without that coding, a user would have to enter a quantity and press <enter> to confirm. At that moment a couple of checks are being performed on the items, which can result in errors.
The problem is that when the default quantity is filled in for the user, there is no need to press <enter> and so those checks are skipped. Even though there should be an error (at least in the test case), we see nothing.
The default quantity is being called from a CRM event (after creation of an item) and used the CRM_SCHEDLIN_I_MAINTAIN_OW function to change the quantity. After that, control is turned over to the system once again.
Is there any way of forcing the same checks on the order without having to hit the <enter> key?

Similar Messages

  • BAPI for Ordered Quantity updation for PO after PO line item cancellation

    Dear Experts,
            I am trying to cancel a line item in ME22N for a particular Purchase Order. When I cancel an item, the ordered quantity is updated in the Status Tab for Header Details. I want to know how is this quantity getting updated and which BAPI is triggered for cancellation. Is it simply adding up the quantities for all line items?

    Header values are addition of line items at run time. I doubt any BAPI specifically calculates it at the header

  • MRP RUN for the more than one line item in sales order.

    Hi ,
    In the sales order nuber of line item are , i will have to take MRP RUN for selected line item .
    So plz suggest what development will require?
    Abhay
    Edited by: abhay patil on May 30, 2008 8:52 AM

    HI,
    U can write separate prog. Which will ask sales order no. and from to line item or multiple line item of sale order. Then in loop internally pass the each line item no to MD50 prog. Which will run in background.
    I will give u sample prog. Which I had created for running MRP for all the lines items of given sales order in one go.
    *& Report  ZPRG_PP_001
    REPORT  ZPRG_PP_001.
    tables vbak.
    data: begin of it_vbap occurs 1,
            vbeln  type    vbap-vbeln,
            posnr  type    vbap-posnr,
          end   of it_vbap.
    DATA: P_MODE   TYPE    C.
          Batchinputdata of single transaction
    DATA:   BDCDATA LIKE BDCDATA    OCCURS 0 WITH HEADER LINE.
    selection-screen begin of block b1 with frame title text-001.
      parameters :   p_vbeln  like  vbak-vbeln obligatory.
      selection-screen skip.
      parameters :   p_fore   radiobutton group mode,
                     p_back   radiobutton group mode default 'X'.
    selection-screen end   of block b1.
    at selection-screen.
    Check Sales Order
      if not p_vbeln is initial.
        select single * from vbak
          where vbeln eq p_vbeln.
        if sy-subrc <> 0.
          message e499(sy) with 'Invalid Sales Order no.' p_vbeln.
        endif.
      endif.
    start-of-selecTION.
    Get Sales order items
      select vbeln posnr from vbap
        into table it_vbap
        where vbeln eq p_vbeln.
    Set BDC mode
      if p_back eq 'X'.
        p_mode = 'E'.
      else.
        p_mode = 'A'.
      endif.
    Process MD50 BDC
      LOOP AT IT_VBAP.
        perform bdc_dynpro      using 'SAPMM61X' '0160'.
        perform bdc_field       using 'BDC_CURSOR'  'RM61X-TRMPL'.
        perform bdc_field       using 'BDC_OKCODE'  '/00'.
        perform bdc_field       using 'RM61X-KDAUF'  IT_VBAP-VBELN.
        perform bdc_field       using 'RM61X-KDPOS'  IT_VBAP-POSNR.
        perform bdc_field       using 'RM61X-BANER'  '1'.
        perform bdc_field       using 'RM61X-LIFKZ'  '3'.
        perform bdc_field       using 'RM61X-PLMOD'  '3'.
        perform bdc_field       using 'RM61X-TRMPL'  '1'.
        perform bdc_dynpro      using 'SAPMSSY0' '0120'.
        perform bdc_field       using 'BDC_OKCODE'   '=XBAC'.
        CALL TRANSACTION 'MD50' USING BDCDATA MODE P_MODE.
        CLEAR BDCDATA.
        REFRESH BDCDATA.
      ENDLOOP.
    end-of-selection.
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
      CLEAR BDCDATA.
      BDCDATA-FNAM = FNAM.
      BDCDATA-FVAL = FVAL.
      APPEND BDCDATA.
    ENDFORM.
    Ajay P. Nikte

  • How to print the Actual Check on 1st Page if line items are more for F110_p

    Hi,
    How to print the Actual Check on 1st page if the line items are more in F110_PRENUM_CHCK script. The standard script is printing at the last page of line items.
    I tried using
    IF &PAGE& EQ '1 '
    /E 545 --> text element
    ENDIF
    but it is of no use.
    Please let me know if anyone knows. Thanks in Advance.

    Hi Krishna,
    I guess, there is no other possible way to acheive this without modifying the standard driver program. Why because? in you driver program you check window will be called only on the last page... but before you change your driver program give a try like shown below....
    Not sure, but give a try... In the first page you will be printing some void check try to replace the code inside the text element of void check with original check and make all the check void... note: in this text element, be sure you write two conditions...
    IF &PAGE& = 1.
    **PRint all check values..
    ELSE.
    ***Print void values
    ENDIF.
    Close the thread if your question is answered.
    Regards,
    Sairam

  • Retrieving the Change Texts per Line Item (Purchase Order) - Very urgent

    Hi,
    How do you retrieve the Change Texts per Line Item (Purchase Order).
    Table T166T does not list these values per line item.
    Please help. This is very urgent & important.
    Best Regards,
    John

    if you are lookin out for change of item texts ...
    then use the function module ... READ_TEXT.
    and 2 tables r used ... STXH and TLINE ....
    double click on item data ...
    goto PO TEXT tab ....
    double click on text ...
    from menu ...
    goto header ... u'll get 4 fields that u need to consider ...
    TDID
    TDOBJECT
    TDHEAD
    TDNAME
    ALL THESE U'LL FIND IN  STXH
    ITEM TEXT is stored in TLINE
    Edited by: anjali rana on Mar 5, 2008 4:55 AM

  • What is the maximum number of line items we can enter in an order...

    Hi,
       Can anyone explain what is the max number of line items that v can enter in an order....
    or if i want to increase the number of line items than the max where it is controlled.
    Because my mm counter part is facing this in the PO he could make only 9999,the problem is when posting...the accounting document is not getting generated bcas of exceeding the limit.
    venugopal

    hi,
    this is my personal experiance that we can enter at the most 499 line items in SALES ORDER.
    This is because for every line item there will be 2 financial entries, debit and credit. and 1 FI document can have at the most 999 line items (which we can not increase without KEY fromSAP)
    If we divide 999 by 2 then it comes to 499.50 so you can enter at the most 499 line items in Sales order.
    Regards
    Vishal

  • LSMW program to upload the sales order with multiple line items.

    Dear SD and PP Gurus,
    I am new to creating LSMW Program.
    I want to create a LSMW program to upload the sales order with multiple line items. I have read on SDN that it can be done on two phases. First Create Header Data than line items. IS IT TRUE??, Or
    Is there any procedure by which we can load the sales orders with multiple line items in a single run (part).
    I want to use Batch process, not a BAPI or IDOC procedure.
    I have created a program with
    object 0090
    Method 0000
    Program Name RVINVB10
    Program Type D
    Source Structure 1 - For Header and Source Structure 2  for Line Items.
    Mapped Field INDET (With Fix Value 1), ORDERTYPE, SALESORG, DISTCHANNEL, DIVISION, CUSTOMER, PONUMBER , DELVDATE, PRCGDATE, PMTTERM
    INCOT1 INCOT2 with Source Structure - 1 and
    Field INDENT (With Fix Value 2),  ITEMNO, MATCODE, MATQTY, SUOM, PLANT, BATCH, AMOUNT with Structure-2
    than maintained Structure relation ship, field Mapping, Specified Files, Assigned files, Read Data and other process,
    At final stage (Start Direct Input program RVINVB10) it is giving a message - Table name not allowed.
    Please tell me where I am wrong.
    Thanks in advance.
    DSC

    Dear SD Gurus n Experts,
    I have solved the above problem. But there is another problem appearing regarding the date format. Now system generating a message: Date . . is not valid.
    While I am using Date: YYYYMMDD format in flat file, which is SAP's Standard Format.
    In SDN Link: LSMW upload Sales Order using VA01/VA02     I have found that there are some date fields which are mandatory to filled. Here I have mapped
    VDATU - Requested delivery date,  BSTDK - Customer purchase order date,  PRSDT - Date for pricing and exchange rate,  BSTDK_E - Ship-to party's PO date, FKDAT - Billing Date, KORDT - Delivery Date,
    and PRGRS - Date type is Constant = D
    Can any one tell me, where is the priblem.
    With thanks,
    DSC

  • Different Tax base in pricing procedure for a single sales order for different line item material.

    Hi,
    I have a scenario wherein in a sales order, for two different material, the tax base of pricing should get triggered on the basis of sold to party and the material entered at line item level.
    Logic triggers on the basis of Region of Customer & a unique field in the Material Master but problem comes in the calculation of Tax base as the sequence of condition type (from – to)  is already defined in the pricing procedure to pick from a particular step but in second line item the base is different i.e. the sequence of condition types that are maintained in pricing procedure should be different for Tax to calculate differently.
    Kindly suggest if the same can be handled in a single pricing procedure and dynamically taking care of condition type sequence through Alt Cal Base Formula, so far I’ve tried both Alt Cal Formula & Base but it is not working
    Client doesn’t want to go ahead by creating two different orders (through separate Pricing Procedure) for that. They want to have both materials in same order.
    Kindly suggest a suitable way to handle this scenario.
    Regards,
    Aashika Agarwal

    Hi,
    Click on the ''check availability'' button at item overview and then click on ''One-time delivery'' on the top. This will ensure that you will have only one delivery for whatever quantity is confirmed on that date.
    If you want to apply this rule for all orders across a sales area, then you can do the below configuration step :
    SPRO->sales and distribution->basic functions->availability check with ATP logic->Define default settings-> Here in avail. checking rule select A (one time delivery). This will ensure that all orders created for a particular sales area will have only one delivery.
    Hope this helps.
    Regards,
    Palani

  • Sales order no and line item no in account assignment tab of line item no.

    Hi All,
    When we display a sales order and go to line item --> Account assignment tab --> we can see sales order no and line item no in that screen. We want to know from where this existing no. in that field is populating from.
    We want to know this as we want to check feasibility of changing sales order and item no to maintenance contract no and line item no. ( Maintenance contract we have to pick from notification)
    If anybody has any idea about this do let me know as this is urgent requirment.
    Effort will be rewarded.
    Thanks in advance.
    Edited by: Satish Bharambe on Jul 4, 2008 10:38 AM

    Hi Satish,
    You mean Accounting assignment tab-->In Settlement rule details
    If yes the order number which is coming in that field Sales order and for which sale order you are looking that details both are the same numbers(i.e Nothing but sales order number).
    When you create sales order system will give number of the sales order the number will come in this place.
    I hope it will help you,
    Regards,
    Murali.

  • Sales order has 52 line items but in vbep some are not available

    Hi,
    what could be the reason for the problem;
    Sales order has 52 line items but in vbep some are not available...
    and some has 2 etenr as '0001' and '0002', why 2 lines in vbep for 1 posnr of order.
    Thanks.
    deniz.

    Hi,
    It is possible when some of them dont have valid Schedule lines.
    If they have valid schedule lines some confirmed qty should be available.otherwise we cant find them in VBEP table.
    Pls check by going to sales order  whether Sch.lines are valid or not.
    This you can check Thru
    VA03-->provide Sales Order number -->Select any line Item-->Menu item Goto-->Item-->Schedule Lines
    Thanks
    Parvathi

  • MIGO-sales order number and line item not validated for 501E mvt in MIGO.

    Hi All,
    In MIGO i am trying to post for 501E(specisl stock=order on hand) movement type, here i am entering the material and in the where TAb even if I enter wrong sales order number or wrong sales order line item number. the system allows to post .
    its not validating the material against the sales order number and line item number that is entered to check whether that material really exists in that particular sales order or not.
    is there a way to fix this?
    Thanks
    Mahendra

    hi
    i dont think vvalidation is possibel
    as the system dont know whaich material is assigned to which SO
    as we r takeing the stock without PO
    if u want to validate then system can validate the quantity that is also with use of some user exit
    correct me if i am wrong

  • Order Address per Line Item in OLA

    Hi, hoping someone can help with an OA/OLA query.
    One of our Buyers would like to use a different ordering address for one of the line items in an OLA.  Is there any way to set up an Ordering
    Address per line item in the OLA?  Or does she need to create a new OLA?

    I'd suggest writing your own might be easier. Oracle buckets the exposure as per the list below whereas you are probably only interested in seeing a total order exposure (by line item for bottles/shells) and total AR exposure summary.
    Also the standard report will look at the unit sell * the ordered quantity in calculating transaction amounts on open orders which is your problem. If I've understood your requirement correctly, you only want to consider the shells and bottles in the credit check because you enforce prepayment for liquids so presumably your AR o/s balances are only for money owing on shells and bottles.
    In that case, your only real issue is at the order entry stage (again because Oracle will be considering the total transaction value if you're using the standard automated credit check) which is why I suggested the manual workaround there.
    1     Header uninvoiced orders
    2     Header uninvoiced orders tax
    3     Line uninvoiced orders
    4     Line uninvoiced orders tax
    5     Line uninvoiced freight
    6     Header uninvoiced freight
    7     Header and line freight
    8     Invoices
    9     Payments at risk
    10     Order holds
    11     Line holds
    13     Order tax holds
    14     Line tax holds
    15     Order freight holds
    16     Line freight holds     
    17     Header and line freight holds
    18     External exposure
    21     G_BR_INVOICES
    22     G_BR_PAYMENTS_AT_RISK
    23     G_HEAD_RETURN_UNINV_ORDERS
    24     G_LINE_RETURN_UNINV_ORDERS
    25     G_ORDER_RETURN_HOLDS
    30     G_ORDER_RETURN_HOLDS
    31     G_LINE_RETURN_HOLDS

  • Troubles with multiple ESLL-SRVPOS in the same outline agreement line item!

    Hi all,
    Currently have an issue where the same service master is being used multiple times in a single outline agreement line item (set up with different groups in the service specifications with different rates).
    This is causing issues with drawing services into purchase orders.
    Eg: In ME57 when creating a PO from a PR, in the include LMLSPF5J /SEARCH_SRVPOS_CONT/ the system is checking if ESLL-KNT_INTROW is empty (which in my case it is, and message SE361 is displayed).
    The main thing thats happening is that ESLL_KNT_PACKNO and ESLL_KNT_INTROW, which hold the reference data to the outline agreement in the PO should get filled with the packno and introw from the oa service line but it isnt happening.
    I'm thinking of creating a validation so that the same service service number (ESLL-SRVPOS) CANNOT be used in the same outline agreement line item.
    Wondering if anyone has had this same issue and what path they went down to resolve it.
    Any ideas would be appreciated.
    Tim

    hi
    u cannot do this because different line items cannot be in same cell as they are variable and only one field can be there ata atime in one column while creating field catalog
    <b>u can do one thing. corresponding to sales order u can display its line items ion the secondary list and would make more sense also. for this make ur sales order number as HOTPOT on click of which will display its corres line items </b>
    regards
    ravish
    <b>reward if useful</b>
    Message was edited by:
            ravish goyal

  • Service procurement for the free texts ( Multiple line items in PO)

    In the service procurement for the free texts ( Multiple line items in PO)referring to the same  Contract we are cretaing the POs
    thro ME59 ( Program RM06BB20)  an unusual error message appears as under:
    "_Material/Service group STGOP2 does not exist"_This Material group is unavailable in T023 as well.
    We checked the same issue by recreating with the exact data in the Test environment and everything works OK
    We are working on the R3 version 470...
    Any body faced such an issue ?
    Any clues pls?
    Regards,
    Nagarajan

    Hello,
    We have faced another issue of the same nature while a PO is being created using the tcode ME21N for service free text items referring a PR ( Service item has no Contract assigned but a fixed vendor)
    The error relates to SE419 ( Mat grp 'XXXX' does not exist)
    Any takers..
    We are using a custom doc type  for the PR
    Any hep /clue is appreciated
    Regards,
    Nagarajan

  • Help, lost all the songs on my iPod when checked the box titled "Replace all items when Autofilling" in my Autofill Settings window.

    Help, I lost all the songs on my iPod when I deleted a few songs from my iTunes Library, checked the box titled "Replace all items when Autofilling" in my Autofill Settings window, and then tried to Autofill. Note that I do not purchase songs from iTunes, but rather I rip songs off my own cd's and then transfer the mp3 files to iTunes.  And after I transfer mp3 files from my pc to iTunes and then Autofill, I generally delete those files from my pc.
    I can still see the songs in my iTunes Library, but not on my iPod.  Is there a way that I can salvage them and get them back on my iPod?
    Thanks in advance.

    Well you will have to wait to connect you ipod to the orignal computer and it will put all your songs back on to it.

Maybe you are looking for

  • ERROR, while i importing file in Integration Builder/

    Heading 2: HI every body !!!! please help me. Now' i'm integrate SAP r/3 and IBM MAXIMO via SAP XI3 (SAP netweaver 2004s) i need to import file to integration builder, while i'm importing it, I'"ve got the error: ResourceException in method Connectio

  • HT4623 i still cant update my ipod

    So im wayyyy behind on my updates but i can seem to find the update button or anything on my ipod or itunes store helo please

  • Kmix and hdmi

    I decided to try a few days ago here on the hdmi pass audio to the LCD TV. So the problem is that kmix refuses to adjust the volume on the hdmi (selected channel master). Tried in alsamixer - all sliders - does not help. Tried phonon-vlc and phonon-m

  • Problems in pc-suit for 6270

    i've got the following error when i connected the phone via a data cable please help me. Phone Model : 6270 Error in PC Suit : Nokia 6270 is connected in non compatible mode. Your phone is in file transfer mode and cannot be used with pc suit. Quit f

  • Slapconfig backup shell script?

    Trying to create a shell script scheduled with launchctl to backup an open directory master. Googling seems to come up with this script: #!/usr/bin/expect -f spawn /usr/sbin/slapconfig -backupdb "Volumes/MacHD/Backups/odbackup" expect "Enter archive