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

modularation tecnics

Former Member
0 Likes
429

hi friends ,

thios is my one of the interview question.

wt is conversion routines, wt is the diffrent between conversion routines & sub routines.

3 REPLIES 3
Read only

Former Member
0 Likes
402

Hi,

[CONVERSION ROUTINE.|http://help.sap.com/saphelp_nw70/helpdata/en/35/26b217afab52b9e10000009b38f974/content.htm]

[Sub Routines|http://help.sap.com/saphelp_nw04/helpdata/en/9f/db975c35c111d1829f0000e829fbfe/content.htm]

Regards,

G.Balakumar.

Reward Points if helpful.

Read only

Former Member
0 Likes
402

hi,

try check this

regards,

venkat.

Read only

vinod_vemuru2
Active Contributor
0 Likes
402

Hi,

Convertion routines are the ones which are used to covert one value into another.(EG Inernal to external or vice versa)

EG: CONVERSION_EXIT_ALPHA_OUTPUT. This is a function module whcih will delete the leading zeros from a number.

Just go to VBAK table and execute the table and enter some number like 000012345 in vbeln field, then press enter. now It will automatically removes the leading zeros. But how it is happening?

To check this go back to the table, click on the data element, click on the domain. Now in the tab definition u can see one field conversion routine. This is the one which is removing the leading zeros. U can assign these routines to the custom domains also(Zdataelements). This is just a simple example of conversion routine. we have routines with complex functionality.

Subroutines are used for code reusability with in or out of ur program.

Suppose some piece of code is used in many places in ur program then u can put this code in a form and call this where ever it is required instead of rewriting the same code.

I can tell another example.

If there is some header which will be printed in all the reports for some region then u can put it in one subroutine and call this form from all other reports instead of rewriting the whole code.

Syntax:

PERFORM display_header.

FORM display_header.

Write all the headers here.

ENDFORM.

If u r calling a subroutine with in ur program then call like this.

PERFORM display_headers.

If u r calling it from some other program then do like this

PERFORM display_headers(reportname where this form exist).

Thanks,

Vinod.