cancel
Showing results for 
Search instead for 
Did you mean: 

how to determine output based on the content of purchase order

Former Member
0 Kudos

Hi Gurus,

I've a typical requirement at my present project. With vendor X we have punchout catalogs. while creation of shopping cart, we are not allowing the user to mix catalog items and non catalog items into the same shopping cart. Once the shopping cart all shopping carts are automatically coverted into PO.

Now the challenge we are facing is, if the PO is created based on items from catalog, we want to send such PO via XML interface to the vendor. If the PO is created based of items which are free-form, we want to send such PO via Smartform email attachment.

As this condition can only be determined at runtime, I'm finding a challenge to configure this. In both PO cases, vendor is same but the content of the PO is different. One contains all items that are catalog based and other contains items which are non catalog.

Can someone help me find solution for this issue.

Regards,

Sam K

Accepted Solutions (0)

Answers (1)

Answers (1)

lisa_sheil
Contributor
0 Kudos

Dear Sam K,

The difference on the database level for these POs is as follows:

In the PO created from a catalog item, the following field will be filled:

CATALOGID

CATALOGITEM

For the PO created from free text items these fields will be blank.

I hope this helps,

Kind Regards,

Lisa

Former Member
0 Kudos

Hi Lisa,

I understand the difference to identify catalog based PO against non catalog based PO. My challenge is where can I do this check to define the output type.

I tried to check the in the condition types for PO output but didn't find the item details over there.

could you please let me know.

Regards,

Sam K

former_member183819
Active Contributor
0 Kudos

Change Forms for Document Output

You can use the Business Add-In BBP_OUTPUT_CHANGE_SF to override the Smart Forms that are defined in the activity Define Actions for Document Output.

This BAdI serves as an alternative to the IMG activity Condition-Dependent Document Output.

Note that no Smart Forms are used for output via XML.

Standard settings

The following parameters are available in the method CHANGE_FORMS. Depending on the input parameters, you can define other Smart Forms to output the document type.

Importing

IV_GUID

Globally Unique Identifier of the document.

IV_MEDIUM

Output medium found for this document according to Define Actions for Document Output (print: PRN, fax: FAX, e-mail: MAI, XML: MET).

IS_PARTNER

Business partner to whom the document is sent.

IV_OBJECT_TYPE

Business transaction type.

Changing

CV_SMARTFORM

Smart Form used to output the document.

E-mail output

Smart Form with which the document is added to the e-mail in the form of a PDF attachment.

Note:

Note that the BAdI with this parameter overrides the parameter form name (technical name of the Smart Form BBP_PO for example) irrespective of the defined determination technology (SRM: Purchase Order Output Determination, for example).

CV_SMARTFORM_MAIL

Smart Form used to define content and layout of the e-mail text in the case of e-mail output.

CV_SUBJECT_MAIL

Smart Form that determines the text in the (short description of the e-mail content).

As an alternative to this BAdI, you can control document output via determination technology.

For more information, see Condition-Dependent Document Output.

EXPLORE THIS badi

laurent_burtaire
Active Contributor
0 Kudos

Hello Sam K,

You requirement is covered by customizing:

SAP Implementation Guide > SAP Supplier Relationship Management > SRM Server > Cross-Application Basic Settings > Set Output Actions and Output Format > Condition-Dependent Document Output

Start conditions must be implemented for print and xml u2018Process Typeu2019 from action definition 'Standard Purchase orderu2019.

Nevertheless, data from container you want to use as criteria does not exist in standard. You will have to add it to attributes for object type BUS2201 and to populate this field in report RBUS2201 using value from BBP_PDIGP-CATALOGID (see SWO1 transaction).

Then, it will be possible to choose this data when creating your condition definition.

Regards.

Laurent.