cancel
Showing results for 
Search instead for 
Did you mean: 

Sales order Exit..

Former Member
0 Kudos

Hi Experts,

I am new to BADI and my requirement is to use GM_SALES_ORDER_EXT and map the below fields to the sales order:

1. Plant

2. FM Account Assignment Details u2013 Value of Fund

3. Contract Validity Dates u2013 Grant Validity Dates

i have created a classic BADI in SE19. what are the procedure should i follow next.

Regards,

Karthik.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Refer [Link|http://www.sapdev.co.uk/enhance/enhance_badi.htm].

Former Member
0 Kudos

Thanks for the Link, let me update my status today.

I am able to import the fields but when i see the export parameter it's of type BAPIPAREX_T where i should assign and append bapistructure type and its values.can you suggest bapi for the FMIT1-FONDS (Fund Code)

VEDA-VBEGDAT (Valid from)

VEDA-VENDDAT (Valid To)

VBAP_WERKS (plant)

Former Member
0 Kudos

Hi sukumar ,

this i show you need to write the code..



DATA: BEGIN OF t_extension_in OCCURS 10.
        INCLUDE STRUCTURE bapiparex_t.
DATA: END OF t_extension_in.

Data : t_VEda type table of VEDA occues 0,
         wa_veda type veda.
        

      t_extension_in-structure = 'VEDA'.
      wa_VEDA-VBEGDAT =  sy-datum.  "Assigm yuor Valid from date
      wa_VEDA-VBEDDAT =  sy-datum.  "Assigm yuor Valid to date
     wa_VEDA-werks =  Plant.  "Assigm yuor Palnt

      CONCATENATE wa_VEDA-VBEGDAT  wa_VEDA-VBEDDAT wa_VEDA-werks 
      INTO t_extension_in-valuepart1.
     APPEND t_extension_in.
  

Regards,

Prabhudas

Former Member
0 Kudos

Hi,

In my standard program it uses SD_SALESDOCUMENT_CREATE and i need to add values to the 'BAPE_VBAP' structure. only Palnt detail.

Since i am at SO create i dont have VBELN and POSNR to pass in the structure...

Can you give me an idea how should i pass in that strucure using BAPIPAREX.

Former Member
0 Kudos

Hi All,

Thanks for your help.

I appended the fields in the structure BAPE_VBAP & BAPE_VBAK which ever required to pass in the sales order and passed in the BAPIPAREX strucure

like this

DATA: ls_extension TYPE bapiparex.

*Assign Fund and Palnt to the structure 'BAPE_VBAP'

ls_extension-structure = 'BAPE_VBAP'.

ls_extension-valuepart1+10(6) = text-001. "'000000'.

ls_extension-valuepart1+20(10) = i_gmgr_fields-zzfundext.

*Append to the Exporting Bapi structure and clear the structure<LS_EXTENSIONIN>

APPEND ls_extension TO e_extensionin .

CLEAR ls_extension.

Hope this help other ...