Some useful standard Function modules
*=============================================================
*SPELL_AMOUNT *This function module converts amount into English words *============================================================= DATA WORDS1 TYPE SPELL. CALL FUNCTION 'SPELL_AMOUNT' EXPORTING AMOUNT = 679340232 IMPORTING IN_WORDS = WORDS1. * WORDS1 is a structure with some components WRITE:/ WORDS1-WORD.
*============================================================== *NUMERIC_CHECK. *this function module adds leading zeroes for standard SAP field variables *============================================================= DATA ZEROES TYPE KNA1. PARAMETERS PAR_KUNNR TYPE C LENGTH 10. CALL FUNCTION 'NUMERIC_CHECK' EXPORTING STRING_IN = PAR_KUNNR IMPORTING STRING_OUT = PAR_KUNNR. SELECT SINGLE * FROM KNA1 INTO ZEROES WHERE KUNNR = PAR_KUNNR. WRITE:/ ZEROES-KUNNR, ZEROES-STRAS, ZEROES-ORT01, ZEROES-LAND1.
DATA MATL TYPE MARA. PARAMETERS PAR_MATNR TYPE C LENGTH 18. CALL FUNCTION 'NUMERIC_CHECK' EXPORTING STRING_IN = PAR_MATNR IMPORTING STRING_OUT = PAR_MATNR. SELECT SINGLE * FROM MARA INTO MATL WHERE MATNR = PAR_MATNR. WRITE /: MATL-MATNR, MATL-MBRSH, MATL-MTART, MATL-MEINS.
Comments
Post a Comment