cancel
Showing results for 
Search instead for 
Did you mean: 

PO output: XML as default output medium

former_member852447
Active Participant
0 Kudos

Hello experts,

We want to send XML output to a legacy system and we have 4 output mediums on our portal for PO's:

Print

Fax

Email

XML

Is it possible in configuration to make XML the default output medium but still allow the other 3 output mediums to be used.when requested.

regards

Accepted Solutions (0)

Answers (4)

Answers (4)

khan_voyalpadusman
Active Contributor
0 Kudos

all the four output medium's are shown in the purchase order output tab.

defaul output medium is retrived from the following

1) output medium maintained at the supplier master data level , at the purchasing organization level.

2) output medium maitnained --> actions for output maintained in the customizing.

Former Member
0 Kudos

I had the same Problem and I solve it with this code. ( in 3 Systems)

you must do a change in the Po

you use a reference to change all over.

Example:

1º -

 
    DATA:
        lo_po_cl_instance    TYPE REF TO /sapsrm/cl_pdo_bo_po,
        lo_po_temp_instance  TYPE REF TO /sapsrm/if_pdo_bo_po_adv,
        lo_po_adv_instance   TYPE REF TO /sapsrm/cl_pdo_bo_po_adv,
        lo_po_instance       TYPE REF TO /sapsrm/cl_pdo_bo_po,

 * Read an existing PO
CALL FUNCTION 'BBP_PD_PO_GETDETAIL' ...

*change a text 'NOTE'
wa_longtext-tdid      = 'NOTE'.

* Update Doc
CALL FUNCTION 'BBP_PD_PO_UPDATE' ...

* Save Doc
  CALL FUNCTION 'BBP_PD_PO_SAVE'
  CALL FUNCTION 'BBP_PROCDOC_RESET_BUFFER' 

2º Them you use de reference to "/sapsrm/cl_pdo_bo_po"

 
CALL METHOD /sapsrm/cl_pdo_factory_po_adv=>get_instance
  EXPORTING
    iv_header_guid  = ls_i_header-guid
    iv_mode         = 'EDIT'
    iv_process_type = ls_e_header-process_type
  RECEIVING
    ro_instance     = lo_po_temp_instance.  

lo_po_adv_instance ?= lo_po_temp_instance.
lo_po_instance = lo_po_adv_instance.
lo_po_cl_instance = lo_po_instance.

ls_output_s-guid = ls_i_header-guid.
ls_output_s-medium_type = 'XML'.

CALL METHOD lo_po_cl_instance->/sapsrm/if_pdo_do_output~set_output_info
  EXPORTING
    is_output_para     = ls_output_s
  CHANGING
    co_message_handler = e_messages.

*in my case it´s work

*if you want the full code send me a message.

former_member852447
Active Participant
0 Kudos

Hello Masa,

Thank you for solving this issue. I will give you points but ome more question...does this mean that every business partner in master data will need to be updated with this .....

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

I think so.

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Yes. The default comes from Business Partner - Supplier Master Data.

Regards,

Masa