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

How to create Condition Record in Rebate Agreement

Hi Everybody,

I have successfully created Rebate Agreements using BAPI namely BAPI_AGREEMENTS.

Now i want to create Condition Records for created Rebate Agreements.

Is there be any Standard Function Module or BAPI available for this ?

T Code VBO1

Edited by: SAP_USER_CK on Aug 24, 2011 7:54 AM

Edited by: SAP_USER_CK on Aug 24, 2011 12:17 PM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Aug 24, 2011 at 11:25 AM
    " creating rebate agreement number and condition number
       
     CALL FUNCTION 'NUMBER_GET_NEXT'
          EXPORTING
            nr_range_nr             = '01'
            object                  = 'BONUS'
          IMPORTING
            number                  = lv_assign_num
          EXCEPTIONS
            interval_not_found      = 01
            number_range_not_intern = 02
            object_not_found        = 03.
    
      CALL FUNCTION 'NUMBER_GET_NEXT'
            EXPORTING
              nr_range_nr = '01'
              object      = 'KONH'
    
    
    " Call this FM, YOU NEED TO FILL ALL THE INTERNAL TABLE
    " DEBUG and check all the possible value and fill it
    
      CALL FUNCTION 'SD_CONDITION_SAVE_EXIT'
        EXPORTING
          change_docs_write = lv_true
        TABLES
          db_time           = lt_time
          db_xkonh          = lt_xkonh
          db_ykonh          = lt_ykonh
          db_xkonp          = lt_xkonp
          db_ykonp          = lt_ykonp
          db_xstaf          = lt_xstaf
          db_ystaf          = lt_ystaf
          db_xkondat        = lt_xkondat
          db_ykondat        = lt_ykondat
          db_xvake          = lt_xvake.
    
    " and then call
    
      CALL FUNCTION 'RV_KONDITION_SICHERN_V13A'
        EXPORTING
          change_docs_write        = lv_true
          use_outbound_call        = lv_true
        TABLES
          db_time                  = lt_time
          db_xkonh                 = lt_xkonh
          db_ykonh                 = lt_ykonh
          db_xkonp                 = lt_xkonp
          db_ykonp                 = lt_ykonp
          db_xstaf                 = lt_xstaf
          db_ystaf                 = lt_ystaf
          db_xkondat               = lt_xkondat
          db_ykondat               = lt_ykondat
          db_xvake                 = lt_xvake
        EXCEPTIONS
          exc_cacs_versioning_badi = 1
          OTHERS                   = 2.
    
    "and then call
      CALL FUNCTION 'RV_KONDITION_SICHERN_BONUS'
        EXPORTING
          active_kona       = ls_kona
          old_kona          = ls_kona
          update_sign       = iv_action
          change_docs_write = lv_true
          use_outbound_call = lv_true.
    
    " THIS CODE HAS BEEN EXTRACTED AFTER DEBUGGING THE STANDARD TCODE VBO1..
    " WORKS FINE
    " THE ONLY PROBLEM IS YOU NEED TO DEBUG AND FILL THE APPROPROATE VALUES IN THE INTERNAL TABLES
    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.