cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Change output medium to a Local PO in SRM e.g MAIL to XML

Former Member
0 Likes
576

Dear Experts,

I wanted to change the output medium of a Local PO. Currently the Output medium is picked from the Supplier data e.g Mail.

I wanted to change the output medium to say XML.

I have implemented the Badi BBP_DOC_CHANGE_BADI.

METHOD if_ex_bbp_doc_change_badi~bbp_po_change.

DATA : lv_medium TYPE ppfdmetype,

lv_medium_new TYPE ppfdmetype VALUE 'XML'.

  • Check for Vendor customiing and do necessary change.

CALL FUNCTION 'BBP_OUTPUT_PO_PARAMS_GET'

EXPORTING

guid = is_header-guid

IMPORTING

medium_vend = lv_medium.

IF lv_medium <> 'XML'.

CALL FUNCTION 'BBP_OUTPUT_PO_PARAMS_SET'

EXPORTING

iv_guid = is_header-guid

iv_medium_type = lv_medium_new

EXCEPTIONS

no_print_possible = 1

no_mail_possible = 2

no_fax_possible = 3

no_xml_possible = 4

OTHERS = 5.

IF sy-subrc <> 0.

" dO NOTHING AS OF NOW..

ENDIF.

ENDIF.

In Debugging When I save or order the PO , I could see that the medium changed to XML . But When I open the PO , i could see that the Output medium is again fetched from Supplier data.

This behaviour is save , even if I change the Output medium from the output medium tab .

Would be great if you could help me solve this issue.

Best regards,

Prabhu

Accepted Solutions (1)

Accepted Solutions (1)

RobinJanke
Contributor
0 Likes

Hi Prabhu,

try to implement the wanted behaviour in a new implementation of badi TRIGGER_EXECUTED. Copy the already existing implementation/code (BBP_TRIGGER_EXECUTED) to a new z-version and add your own logic to this.

Regards,

Robin

Former Member
0 Likes

Hi Robin,

I tried this badi implementation, but the PO still has the default output from the supplier.

When I open the PO in display mode , i could still see that the Output is MAIL instead of XML.

Best regards,

Prabhu

Answers (2)

Answers (2)

Former Member
0 Likes

This is a bug. Raised OSS and got reply to implement the following note..

0001566016 - Purchase order changed.

Former Member
0 Likes

Hello Prabhu,

Once trying doing same code in SAVE badi and check.

We had a same requirement we did it in save badi it is working.

Regards,

Neelima

Former Member
0 Likes

Hi Neelima,

I tried implementing the same in the Save Badi. Still no success.

I guess this is standard bug, I deactivated all my badi implementation and test the standard feature.

I went to the Output tab, by default it was Email and I changed it to XML in the screen.

when i save the PO document . it saved.

But , we opened it again in display or edit mode. It is again defaulted to EMAIL .

Just an information :

Note 1072367 - No output medium identified error even if medium selected.

This note is released with manual correction for SRM_SERVER Ver 6 and say

this is has been included in the SRM_SERVER 7 version.

This piece of correction is not available in our system.

I guess this might be a standard bug ? Please suggest me .

Best regards,

Prabhu