Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BADI for VA01 Header ( Order Data)

Former Member
0 Kudos

Hi,

I am working on the tcode VA01 BADI / Enhacements in which i am trying to implement a code in Header of Sales Order -> Order Data...... I am using a BADI BADI_SD_V46H0001 and made some amendments in the code in the method EXIT_SAPLV46H_003 but when i try to make enhacement for it,the error of no enhancement would created...

I want to know how it is to be done so that i can proceed with my further working ...

Edited by: nav009 on Aug 6, 2009 8:58 AM

11 REPLIES 11

former_member272911
Participant
0 Kudos

Hi,

Could you elaborate your question.?

Thanks

kamath

0 Kudos

hi,

actually there is a field called 'Collective Number' in the Order data tab of sales order header and i had put a break point in the method EXIT_SAPLV46H_003 during the implementation phase SE19 i.e.:-


method IF_EX_BADI_SD_V46H0001~EXIT_SAPLV46H_003.
  I_VBAKKOM-SUBMI = 1.
  BREAK-POINT.
endmethod.

But when i try to create a enhacement in SE18,it does not allow me to create an enahcement spot for this badi as there are no previous enhancements in it.... and it is not allowing me to activate the code which i had written in the method EXIT_SAPLV46H_003....

0 Kudos

Hi,

It is not possible to create an enhancment spot for the above said BAdi definition. I would suggest you can rather go in to a classical BAdi implementation.

se18 -> BAdi Name ->BADI_SD_V46H0001-> Enhancement Implementation -> Create.

Regards,

Sandeep

0 Kudos

hi,

Are u implementing the badi or u want to enhance the code using the enhancement point. If u want to use badei. Follwo the setp mentioned by sandeep.

Thanks

kamath

0 Kudos

Hi,

Thanks for your response,I am working the ECC Version 6.40 ,here the implementation is done through SE19 Create Implementation. i had created it named:-

ZBADI_SD_CHGHEADER1 and written the above mentioned code and then activated it.

When i execute the tcode VA01,VA02 ,the code which is present in the method EXIT_SAPLV46H_003 does not work.

What should i allow the execution of the code?

Edited by: nav009 on Aug 6, 2009 11:37 AM

0 Kudos

Hi,

There could be 3 reasons.

1.

The BADI you have used can only have a single implementation i.e. Multiple use is Unchecked.

If an existing Implemetn is available ,then you cannot activate your New Implementation .So Try to put ur code in active implementation .

2.

If there is no existing implementations available then try to activate your BADI in SE19 or check for Filter criteria in BADI

3.

You might be looking at the wrong Badi. Keep a Break point in CL_exithandler->Get_instance method and check whether the BADI is getting called or not..

Thanks,

AJR

0 Kudos

Hi,

I had checked the implementation of it also and i also verfied that the implementation which i had done is only activated not any other one.

When i execute the code it is not giving the desiered result in the tcode VA02.......

  • I am facing a problem that when i try to create the enhacement spot for this BADI,it does not allows me to create and by only implementation performed it does not execute the desiered result.*

I really dont know how to solve this problem. I searched a lot but still did not got the solution for it.

Edited by: nav009 on Aug 12, 2009 11:49 AM

Edited by: nav009 on Aug 12, 2009 12:11 PM

Former Member
0 Kudos

hi

You can add the required tab there by designing the layout in this screen and can write the logic in either " MV45AFZZ" or "MV50AFZ1".

This can be done as:

process before output.

  • Verarbeitung vor der Ausgabe

*{ INSERT "TR No" 1

module zzchange_validity_screen.

*} INSERT

process after input.

  • Verarbeitung nach der Eingabe

*{ INSERT "TR No" 1

field vbak-zzvaldt module zzvaldt_check on request.

*} INSERT

Saurabh Goel

0 Kudos

Hi,

Actually i am trying to add the data in a field which is already present in the tcode VA01,VA02 but i am not able to add the data which is present in that field.....

Is it possible to add the data to field through BADI for tcode VA01?

Edited by: nav009 on Aug 12, 2009 1:06 PM

0 Kudos

Hi,

The control should come to this method of the BADI implementation i think you should check if you have created the implementation correctly and it is properly activated, Please check the below link for the same:

link:[BADI Implementation][https://wiki.sdn.sap.com/wiki/display/Snippets/CreationofEnhancementSpot,BADIDefinitionandImplementationinECC6.0]

You should also check if the field that you want to chnage is avaliable in structure I_VBAKKOM and assign the value to this structure only.

Regards,

Himanshu

0 Kudos

Hi Himanshu,

Yes i had checked the implementation and it does not conatin any errors and that field is present in the structure .... I_VBAKKOM-SUBMI (Collective Number)

here's the code which i am using right now in the implementation:-



method IF_EX_BADI_SD_V46H0001~EXIT_SAPLV46H_003.

  IF SY-TCODE = 'VA02'.
  if sy-UNAME = 'ISDEPT'.
  I_VBAKKOM-SUBMI = 1.
  BREAK-POINT.
  ENDIF.
  ENDIF.

endmethod.

The thing is when i try to create a create a enhacement spot for the badi (which is system generated) is not allowing to create for it,even i tried to use the implementation also ....

Please rectify if i am wrong at any step ....

Edited by: nav009 on Aug 13, 2009 10:14 AM