cancel
Showing results for 
Search instead for 
Did you mean: 

PO form printout via webservice - problems with copied webservice

mario_maisto
Participant
0 Kudos

Hey there,

I am facing difficulties when trying to get the Purchase Order output with an edited/copied web-service.

I have designed a PO document layout with the Adobe Livecycle Manager. At first, the layout used the standard web-service FDP_EF_PURCHASE_ORDER_SRV. Printout with this service worked without problems, and the layout managed to display most of the required document data (I displayed the PO document with the created layout in transaction me22n - Messages - Display PDF Document).

As the default web-service lacked some fields, that I needed (for example Price Per Unit), I made a copy of the service (in transaction SEGW) and added the required field and tested the service successfully in gateway client (The Price Per Unit field was there).

After doing that, I swapped the default service with the enhanced copied service in the layout's properties:

But after swapping the service, I get an error "Key parameter PurchaseOrder has not been provided." when trying to display the PO document in me22n.

Have I missed something in the configuration (e.g. - do I need to set the new created service as the PO print service somewhere) ? As the custom web-service is a copy from the default service, with just only one field added, there should not be much that has changed.

I hope there's somebody who would help me with this problem.

Thank you,

Mario.

Farai
Discoverer
0 Kudos

Hello

I am facing the same issue. May I please know how you managed to resolve it?

Thank you,

Audrey

mario_maisto
Participant

Hi Audrey -
Since it was a long time ago I do not remember the exact details, but past-me replied this as a solution 🙂 :

"Just writing to let others, who are maybe dealing with the same issue, know that I got helpful information from the OSS note.

The solution was that I needed to:

  • make a copy from the class CL_MM_PUR_PO_OUTPUT_CALLBACK and in the copied class set the custom web-service as the web-service to be used.
  • Set the copied output class (e.g. ZCL_MM_PO_OUTPUT_CALLBACK) in the purchase order output type (spro->Cross-Application Components->Output Control->Define Output Types->(Purchase Order Callback Class) or simply maintain the same for purchase order in table APOC_I_OUTP_TYPV

Maybe someone finds it helpful as well 😊 ,
"

Farai
Discoverer
0 Kudos

Thank you Mario
The solution worked.

Regards
Audrey

Accepted Solutions (1)

Accepted Solutions (1)

William_Laverde
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Mario,

Please take a look at note 2228611 this might help you out.

mario_maisto
Participant
0 Kudos

Hello William,

thank you for your reply! I went through the note 2292646 - SAP S/4HANA output control - form templates with fragments. Under the subheading of Form Implementation it is said that

"Each gateway model also has an ABAP class for data retrieval. The class name ends with "DPC_EXT". This class can be used to implement special logic, which cannot be modeled."

I am guessing, that the problem is the DPC_EXT classes were not copied into the cloned web-service. The error message that I get informs me that one of the key parameters of the web-service is not filled. So I am thinking, that this logic, that connects the data of the PO to the service, is somewhere implemented in those DPC_EXT classes. I tried to manually copy the code of EXT classes into the copied clone web-service EXT classes, but with doing that I get a lot of ABAP errors.

Do you know whether there is a way to copy the whole DPC_EXT package to another (copied clone service) service ?

Thank you,
Mario.

mario_maisto
Participant
0 Kudos

I am still facing this error. At the cloned web-service's DPC_EXT class I redefined all the methods, that were redefined in the original, as well with the attributes.

I would also like to point out, that right now I am testing it with a clean clone - no additional fields have been added yet - still the same error.

At this point I am not sure where to debug - I added break-points in those extended methods, but they wont initiate. The error message, that I get in me22n/me23n informing "Key parameter PurchaseOrder has not been provided" is right now not so helpful in terms of finding where is the problem..

Any ideas?

Mario.

William_Laverde
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Mario,

I don't know if there is a was to copy DPC_EXT package to another I would suggest you open an OSS incident under BC-SRV-FP and the colleagues should be able to give you more info and help on this issue.

Regards,

William Laverde

mario_maisto
Participant
0 Kudos

Just writing to let others, who are maybe dealing with the same issue, know that I got helpful information from the OSS note.

The solution was that I needed to:

  • make a copy from the class CL_MM_PUR_PO_OUTPUT_CALLBACK  and in the copied class set the custom web-service as the web-service to be used.
  • Set the copied output class (e.g. ZCL_MM_PO_OUTPUT_CALLBACK) in the purchase order output type (spro->Cross-Application Components->Output Control->Define Output Types->(Purchase Order Callback Class)  or simply maintain the same for purchase order in table APOC_I_OUTP_TYPV

Maybe someone finds it helpful as well ,

Mario

Former Member
0 Kudos

Hi Mario,

I'm also facing same error in Billing document form print out. Have copied class CL_BILLING_OUTPUT_CONTROL and assigned to output types in SPRO. But dont know where to set the custom webservice to the used one? do you mean in class ZCL_BILLING_OUTPUT_CONTROL. Can't see anything in properties.

" make a copy from the class CL_MM_PUR_PO_OUTPUT_CALLBACK  and in the copied class set the custom web-service as the web-service to be used."

Your help will be appreciated.

Thanks

mario_maisto
Participant
0 Kudos

Hi Sheetal!

Just go to se80, search for your ZCL_BILLING_OUTPUT_CONTROL, double click on it, then in the "Method" tab, you'll find the method IF_APOC_COMMON_API~GET_FDP_PARAMETER and in there you will find the line to set your service name (not 100% sure, but it may be the line of 21: ls_fdp_parameter-fdp_srvc_name = lr_output_request_info->fdp_srvc_name where you can set it).

Hope this helps,

Mario

Former Member
0 Kudos

Thanks Mario,

I have already assigned the Z FDP service to SFP form and hence this was populated correctly in ls_fdp_parameter-fdp_srvc_name = lr_output_request_info->fdp_srvc_name.

My requirement is to add field in Billing Form Template and add company address on header ( for which modified Master form 'APOC_DEMO_FORM_MASTER_US' and created Z service ZFDP_OM_FORM_MASTER_SRV with added company address node. but somehow get message as 'Key parametr Address Type not defined in VF03).

After debug looks like the top node is selected as company address node and hence other fields are not recognised

PrintFormTitleText

WatermarkText

SenderAddressText

Logo1Image

Logo2Image

Logo3Image

Did you redefine the project from std in SEGW? I have copied and hence can't see existing methods in Redefine node.

Answers (0)