cancel
Showing results for 
Search instead for 
Did you mean: 

Badi BBP_DOC_SAVE_BADI

Former Member
0 Kudos

Hello,

we are using badi BBP_DOC_SAVE_BADI to trigger idoc sending for PO.

We would like to send an idoc when a PO is created or changed. We do not want to send an idoc when we issue output for a PO. For all that cases, the badi is used.

We have correctly handled the PO creation process.

However, we are not able to distinguish the modification process from the output process into the badi.

Do you know a way to determine, into the badi, when we are dealing with modification process and when we are dealing with output process (for example the service code used which is not the same for the 2 processes ... but we do not find it anyway) ?

Thank you very much for your help.

Regards.

Fabrice

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello all,

we are working with SRM 4.0.

Gerardo, we are indeed looking for what you have understood.

Of course, we already thought to check sy-ucomm (and sy-tcode). But the field is always empty into the BADI !

Fabrice

Former Member
0 Kudos

Fabrice,

That's strange, cuz even if you run the instance in test mode from SE19, the sy-ucomm contains a value, it is something like 'TSDB'... Look i haven't work before with the sy-tcode but the sy-ucomm always, that's why it sound strange 4me... why don't you try to review your steps, maybe you are missing a step or doing something wrong.

Have you tried to put a HTTP breakpoint or a long loop to catch the badi execution by SM50?

Try to run it in test mode and debug, you just need to put the object type (BUSxxxx) and object GUID.

regards,

Gerardo.

Former Member
0 Kudos

Hi

Pls try out this.

As soon as you make any changes to the document, the BADI

BBP_DOC_CHANGE_BADI is always triggered. Create an Implementation for the respective business object type (BUSxxxx) for the same and then try out.

Hope it will help.

Regards

- Atul

Former Member
0 Kudos

Fabrice,

Your question is not so clear 4me but, what i understood about it is that you want to catch the code of the activity selected by user in BBP_DOC_SAVE_BADI to distinguish between changing/saving the document and sending to output, if yes, check sy-ucomm comparing with the activity values found in BBP_PD_CON_STATUS constants for activities, like:

  • Activities

CONSTANTS:

c_a_save TYPE j_vorgang VALUE 'SAVE',

c_a_send TYPE j_vorgang VALUE 'SEND',

c_a_xml_confirm TYPE j_vorgang VALUE 'CFXA',

c_a_xml_post TYPE j_vorgang VALUE 'IVXA',

c_a_pco_sus_send TYPE j_vorgang VALUE 'SFSD',

etc... etc...

Hope this helps, if not, please try to review your question and redefine it....

Regards,

Gerardo.

Former Member
0 Kudos

Hi

Which SAP Version you are currently into ?

Can you please elaborate your problem. What exactly you want to achieve out of this ?

Regards

- Atul