Skip to Content
author's profile photo Former Member
Former Member

Price update in VF02

Dear Friends,

according to our requirement.

i need to update price in VF02

in the vf02 Condition tab there is a button call UPDATE

so i want to do this part by automatically i mean by coding

please if you have done this kind of thing please update me.

Thanks in advance

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Jan 20, 2012 at 04:44 AM

    Hi,

    Can you explain more.There are some goo no of exits and badis available.

    Regards,

    Madhu.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 20, 2012 at 04:57 AM

    If you want to control pricing type (B or C etc) through configuration, you can do it in item category level copy control configuration in VTFA (If you are doing order related billing) and VTFL (if you are doing delivery related billing) in the field "Pricing type". This will work during invoice creation, when the invoice is getting copied from order or delivery

    However if an invoice is already created and you want to reprice like you would do in VF02, you can do a BDC like below.

    The below code does repricing on a sales order item, but you can record similar coding on VF02 also, using SHDB and tailor accordingly. We have this code working in our system where we reprice our contracts/orders using the same.

    LOOP AT ft_item INTO ls_item.
    
    * Item overview screen - Press the item position button
        PERFORM bdc_dynpro USING 'SAPMV45A'     '4001'.
        PERFORM bdc_field  USING 'BDC_OKCODE'   'POPO'.
        PERFORM bdc_field  USING 'BDC_CURSOR'   'RV45A-VBAP_SELKZ(01)'.
    
    * Item position popup screen - Enter item number and press OK
        PERFORM bdc_dynpro USING 'SAPMV45A'     '0251'.
        PERFORM bdc_field  USING 'BDC_OKCODE'   'POSI'.
        PERFORM bdc_field  USING 'RV45A-POSNR'  ls_item-posnr.
    
    * Item overview screen - Select item and press pricing button
        PERFORM bdc_dynpro USING 'SAPMV45A'     '4001'.
        PERFORM bdc_field  USING 'BDC_OKCODE'   'PKO1'.
        PERFORM bdc_field  USING 'BDC_CURSOR'   'VBAP-POSNR(01)'.
        PERFORM bdc_field  USING 'RV45A-VBAP_SELKZ(01)'  'X'.
    
    * Item pricing screen - Press price "Update" button
        PERFORM bdc_dynpro USING 'SAPMV45A'     '5003'.
        PERFORM bdc_field  USING 'BDC_OKCODE'   'V69A_KONY'.
        PERFORM bdc_field  USING 'BDC_CURSOR'   'KOMV-KSCHL(01)'.
    
    * Price update popup screen - Double click SAP B or C reprice type
        PERFORM bdc_dynpro USING 'SAPMSSY0'     '0120'.
        PERFORM bdc_field  USING 'BDC_OKCODE'   'PICK'.
    
        CASE ls_item-knprs.
    * If B is requested in input, we do reprice B which
    * will eliminate all manual repricing and bring back SAP item pricing
          WHEN 'B' OR 'D' OR 'M'.
          PERFORM bdc_field  USING 'BDC_CURSOR' '05/03'."05/03 = repricing B
    
    * If C is requested, we do C repricing keeping manual conditions intact
          WHEN 'C'.
          PERFORM bdc_field  USING 'BDC_CURSOR' '06/03'."06/03 = repricing C
        ENDCASE.
    
    * Item pricing screen - Go back to Item overview screen
        PERFORM bdc_dynpro USING 'SAPMV45A'     '5003'.
        PERFORM bdc_field  USING 'BDC_OKCODE'   'BACK'.
        PERFORM bdc_field  USING 'BDC_CURSOR'   'KOMV-KSCHL(01)'.
    
    ENDLOOP.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 20, 2012 at 09:24 AM

    Hi ,

    there is no such config to perform "Update" functional automatically when user opens billing doc in VF02 and you are not suppose to do it also ...

    but if you requirement is that , then you need to use some FMs like "PRICING" in User Exits.

    regards

    Prabhu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 20, 2012 at 10:10 AM

    Dear Friend,

    i have done it by own FM.

    Thanks you all for the given valuable comments

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.