cancel
Showing results for 
Search instead for 
Did you mean: 

MS Word Web Service Interface: bad format of date and currency fields

former_member185943
Participant
0 Kudos
98

Hi,

I am using MS Word Web Service interface to create contract documents. However, my date and currency fields show in a strange format. Date is in"YYYY-MM-DD" format, while currencies always have "." as decimal separator (probably technical values). My user settings are "DD.MM.YYYY" for dates and "n.nnn,dd" for decimal numbers.

My workaround is to create a Z structure for WS interface with char fields and then do conversion through CRM_WST_RT_BADI->OUTBOUND_PROCESSING method. This works, but requires a lot of custom development.

Is there a way to "tell" the interface to use correct formats in MS Word without doing it all manually through custom fields?

Thanks!

KR,

Igor

View Entire Topic
robert_kunstelj
Active Contributor
0 Kudos

You can format numbers and dates by inseting 2 keywords (DATE and NUM) between the XML tags of desired field.

Regards.

former_member185943
Participant
0 Kudos

Hi, Robert,

I only know how to work with the mentioned BADI, which works with structure parameters with fields referencing SAP dictionary data elements. In my case, date fields are of type DATS 8, which leaves no option for tags or any other formatting.

How can I modify the XML directly?

An example would be most helpful.

Thanks!

KR,

Igor

robert_kunstelj
Active Contributor
0 Kudos

You define these keywords in ms word directly. When you insert xml tag on desired place in word, you type in also in the middle of tag the keyword.

former_member185943
Participant
0 Kudos

I got it! It's the word that needs to be typed directly in word, as it would be content of MS Word tag, right? It works!

Million thanks!

KR,

Igor

robert_kunstelj
Active Contributor
0 Kudos

Glad to help fellow from neighbor country.

former_member185943
Participant
0 Kudos

Oh, indeed!

We might be closer than you think - I live close to Croatian-Slovenian border so we might pop out for a drink! But we can discuss this out of forum...

Now work again:

Is there any documentation on possible formatting keywords? I suppose it's possible to set up decimal places, custom date formats etc.

Cheers,

Igor

robert_kunstelj
Active Contributor
0 Kudos

I don't know for any document, but you can read a bit more about word template functionality on http://help.sap.com/saphelp_crm70/helpdata/EN/e3/21a005137e4daa9a36149923142235/frameset.htm.

former_member185943
Participant
0 Kudos

Thanks, Robert!

Unfortunately, at the SAP help link that you have provided there is no mention of any more formatting options. DATE works well, but in my case NUM is useless because it shows only integers. It even rounds decimals to integers, which noone asked for. Is there a cure to this?

KR,

Igor

robert_kunstelj
Active Contributor
0 Kudos

I think this are the only 2 keywords that can be used.

former_member185943
Participant
0 Kudos

OK, thanks anyway! Your help was very useful.

KR,

Igor