Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

USEREXIT_SAVE_DOCUMENT

Former Member
0 Likes
1,241

Hi all,

In the exit 'USEREXIT_SAVE_DOCUMENT' how to fetch sale order data in user-defined internal tables. I need to convert it to XML format after that.

Regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,195

Hi,

You can use VBAK and VBAP tables in the user exit directly.

To convert the data in XML you can check the following link.

Cheers

VJ

Hi all,

In the exit 'USEREXIT_SAVE_DOCUMENT' how to fetch sale order data in user-defined internal tables. I need to convert it to XML format after that.

Regards

11 REPLIES 11
Read only

Former Member
0 Likes
1,195

check table XVBAP+XVBAK,u will get the data , after that u can convert into XML based on ur logic.

Regards

Prabhu

Read only

Former Member
0 Likes
1,196

Hi,

You can use VBAK and VBAP tables in the user exit directly.

To convert the data in XML you can check the following link.

Cheers

VJ

Read only

0 Likes
1,195

Hi

Thanks for the reply,

Whenever we create a sale order, i wanted to download it to the logical system in XML format & it should be event based, without using exits. Is it possible

Read only

0 Likes
1,195

Hi Rafi,

In ur requirement i think best is to implement the user exit which will be real time. The moment the sales order is created it will trigger your logic.

If you want to do outside the exit you have will have to write a custom program which picks up the Sales data ( may be you can use BAPI to get the details ) and then create your XML program.

Cheers

VJ

Read only

0 Likes
1,195

Hi

We should not use exits, instead we need to write a program manually which fetches data of sale order.

Read only

0 Likes
1,195

Hi Rafi,

You can create an output type which will trigger at the time sales order gets created and attach your XML download program to it, in that case as soon as sales order is created this output type will be executed and file will be generated.

For for you have to take help of functional guys to create automatic output type and assigned your program to it.

Regards

Atul

Read only

0 Likes
1,195

Hi Atul,

I think output type is BA00, and the standard program is RSNASTED. But the problem is RSNASTED gives output in SAPScript, i wanted to download it to logical system, can u tell me how do i do that.

Regards

Read only

0 Likes
1,195

Hi Rafi,

Not a problem you can create one more output type and assigned your Z program to it.

Atul

Read only

Former Member
0 Likes
1,195

Hi,

all the sales order data will be in XVBAK and XVBAP internal tables, from those tables you can get the data and implement the logic to convert it to XML.

Regards

vijay

Read only

Former Member
0 Likes
1,195

Hi Rafi,

First send the salesorder data to SAPscript then you can convert it to XML Format.

Regards:-

Santosh

Read only

0 Likes
1,195

Hi

The data should be message type & in XML format.