SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

Update DFKKOP in during FPCOPARA

govind_parmar
Participant
0 Kudos

Hi experts,

1) I am printing an Invoice thru FPCOPARA and needs to update some custome fields in DFKKOP table. can you please let me know which event or BAPI in need to call for updating the custom fields.

2) After creating the invoice - thru application form (smartform), i need to covert it into XML and send it to legacy system. Can you please tell me the steps for this too.

Thanks,

Govind Parmar

1 ACCEPTED SOLUTION

rajesh_popat3
Active Participant
0 Kudos

Hi Govind,

As mentioned, you are using SMARTFORMS, for the application form type. So, there is an output option provided for the smartform, XSF (XML for Smartforms), that would give the XML format output.

So, when you are running the FPCOPARA tcode, for the print parameter select the output type as XSF format, and for the spool that are generate you should be able to get the XSF format output.

Also, for updating the DFKKOP table during printing, you need to handle the same in the User Exit for the application form. For DFKKOP, you can use FM 'BAPI_CTRACDOCUMENT_CHANGE' to change the document as already mentioned above.

Hope this helps!!

Regards,

Rajesh Popat

View solution in original post

4 REPLIES 4

Former Member
0 Kudos

Govind,

Can't you update your customfields in DFKKOP in the exit in the application form when printing? This way you will be sure that you update all items in DFKKOP that are actually printed since you could still skip lines for printing in the exit.

Next to that you could create a program that picks up the spool file you have created while running FPCOPARA and convert that to an XML file or you could try and use the exit in the application to create an XML file.

Regards,

Arnoud

0 Kudos

Thanks Bom.

Is there any FM to update the DFKKOP table which i can call in exit of application form.

Can you please sent me the code for coverting spool smartform in XML ?

Govind.

0 Kudos

For updating the document you could use BAPI_CTRACDOCUMENT_CHANGE I think

And for getting the spooldata I think we used FM RSPO_RETURN_SPOOLJOB. But that was a long time ago. We didn't convert to an XML document but to another format so I can't give you the code for converting to an XML format. The principle is the same though. Once you have the spool lines, get the data out of it and reformat it to the desired format.

I hope this can help you in the right direction.

Regards,

Arnoud

rajesh_popat3
Active Participant
0 Kudos

Hi Govind,

As mentioned, you are using SMARTFORMS, for the application form type. So, there is an output option provided for the smartform, XSF (XML for Smartforms), that would give the XML format output.

So, when you are running the FPCOPARA tcode, for the print parameter select the output type as XSF format, and for the spool that are generate you should be able to get the XSF format output.

Also, for updating the DFKKOP table during printing, you need to handle the same in the User Exit for the application form. For DFKKOP, you can use FM 'BAPI_CTRACDOCUMENT_CHANGE' to change the document as already mentioned above.

Hope this helps!!

Regards,

Rajesh Popat