cancel
Showing results for 
Search instead for 
Did you mean: 

Amount in words in PDF

Former Member
0 Kudos

hi all,

I have a requirement where in i have to print amount in words. The user enters the amount in table rows, and the total in amount gets printed in another text field. I have put the code for sum in the exit event of the rows(cell) this is done through formcalc.

Now i have requirement to print the amount in words

1. Is there any function like SPELL in form calc? (i doubt there would be one...!!)

2. If there is no such funcrion, then how to implement this functionality? Can i some how call the FM SPELL in the interactive form or may be generate a event that would call FM SPELL in my WD componentand then print the result back in my interactive form?

All help will be appreciated.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Solved, it my self.

Sandra_Rossi
Active Contributor
0 Kudos

Nice to know you solved the problem, but tell us how ([rules of engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] require that we give a feedback as other people may have the same question)

Former Member
0 Kudos

hi Sandra,

Would be glad to do so, and here it goes....

1. I placed a SubmittoSap button from Native controls library, as i am using WD ABAP (Native).

2. In the interactive UIElement on the layout tab of my WD component, i created an event handler "PDF_MODIFY" on OnSubmit event

3. And within this method i put the code to read the context element which is bound to the element in PDF, and passed that value (amount in figures) to SPELL_AMOUNT Function module.

4. In the last and final step i called the method Set_Attribute to set the value (amount in words) to the desired element in PDF form.

And it was working after following all these steps.

Former Member
0 Kudos

Hey Runal,

I haven't had much experience with Interactive forms inside WDJ, but I think this will work...

In the Submit To SAP button, this code exists...


// DO NOT MODIFY THE CODE BEYOND THIS POINT - 710.20060821084622.325745.280724 - SubmitToSAP.xfo
ContainerFoundation_JS.SendMessageToContainer(event.target, "submit", "", "", "", "");
// END OF DO NOT MODIFY

This code triggers an event call to the backend.

What I would do is have a variable in your form that you set just before you click the button so you know what "event" you want to trigger, then of course, set it to null inside the method... when it goes back into the method in your web dynpro, you could then take the number, call the function module, and return the value to the screen.

In theory, this should work.

Hope this helps...

Cheers,

Kevin

Former Member
0 Kudos

hi Kevin,

Thanks for the response, but i am sorry i forgot to mention that i am using WD ABAP, but anyway let me try out your concept.