Simple Function Module convert charter formats to Date
Here is Programs to convert CHAR formats to date Some time Requirements to convert so here simple logic so you can code and get output
FUNCTION zsd_rohini_kumar_info.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(I_VKORG) TYPE VKORG OPTIONAL
*" VALUE(I_FKDATL) TYPE CHAR10
*" VALUE(I_FKDATH) TYPE CHAR10
*" EXPORTING
*" VALUE(ET_VBRK) TYPE ZTSD_BILLING_SALES_ORG
*"----------------------------------------------------------------------
DATA:lv_fkdatl TYPE fkdat,
lv_fkdath TYPE fkdat,
lv_str1 TYPE string,
lv_str2 TYPE string,
lv_str3 TYPE string.
lv_fkdatl = i_fkdatl+6(4) && i_fkdatl+3(2)
&& i_fkdatl+0(2).
lv_fkdath = i_fkdath+6(4) && i_fkdath+3(2)
&& i_fkdath+0(2).
DATA: lv_string TYPE string.
lv_str1 = `'` && i_vkorg && `'`.
lv_str2 = `'` && lv_fkdatl && `'`.
lv_str3 = `'` && lv_fkdath && `'`.
IF i_vkorg IS NOT INITIAL.
CONCATENATE `VKORG =` lv_str1 'AND FKDAT BETWEEN'
lv_str2 'AND' lv_str3 INTO lv_string SEPARATED BY space.
ELSE.
CONCATENATE 'FKDAT BETWEEN'
lv_str2 'AND' lv_str3 INTO lv_string SEPARATED BY space.
ENDIF.
SELECT vkorg SUM( netwr )
FROM vbrk
INTO TABLE et_vbrk
WHERE (lv_string)
GROUP BY vkorg.
ENDFUNCTION.
*********************************************************************************RICEF
Reports interface Converstion , Enhancements , Forms
Classical Reports ALV Programming, ALE/ IDOC
BDA Programming, Call Transcation , SAP Script, Smartforms, Adove forms,
SAP T-CODE
MM FLOW , SD FLOW , SE11,SE18 ,SE24,SE30, SM12,ST22, SE41, SE51, SE80,SE84
SE90,SE10,SE09,SE03,
Getway T-Code
/IWFND/GW_CLIENT
/IWFND/ERROR_LOG
/IWFND/APPS_LOG
/IWBEP/VIEW_LOG
/IWFND/CACHE_CLEANUP
/IWFND/TRACES
*********************************************************************************
FUNCTION zsd_rohini_kumar_info.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(I_VKORG) TYPE VKORG OPTIONAL
*" VALUE(I_FKDATL) TYPE CHAR10
*" VALUE(I_FKDATH) TYPE CHAR10
*" EXPORTING
*" VALUE(ET_VBRK) TYPE ZTSD_BILLING_SALES_ORG
*"----------------------------------------------------------------------
DATA:lv_fkdatl TYPE fkdat,
lv_fkdath TYPE fkdat,
lv_str1 TYPE string,
lv_str2 TYPE string,
lv_str3 TYPE string.
lv_fkdatl = i_fkdatl+6(4) && i_fkdatl+3(2)
&& i_fkdatl+0(2).
lv_fkdath = i_fkdath+6(4) && i_fkdath+3(2)
&& i_fkdath+0(2).
DATA: lv_string TYPE string.
lv_str1 = `'` && i_vkorg && `'`.
lv_str2 = `'` && lv_fkdatl && `'`.
lv_str3 = `'` && lv_fkdath && `'`.
IF i_vkorg IS NOT INITIAL.
CONCATENATE `VKORG =` lv_str1 'AND FKDAT BETWEEN'
lv_str2 'AND' lv_str3 INTO lv_string SEPARATED BY space.
ELSE.
CONCATENATE 'FKDAT BETWEEN'
lv_str2 'AND' lv_str3 INTO lv_string SEPARATED BY space.
ENDIF.
SELECT vkorg SUM( netwr )
FROM vbrk
INTO TABLE et_vbrk
WHERE (lv_string)
GROUP BY vkorg.
ENDFUNCTION.
*********************************************************************************RICEF
Reports interface Converstion , Enhancements , Forms
Classical Reports ALV Programming, ALE/ IDOC
BDA Programming, Call Transcation , SAP Script, Smartforms, Adove forms,
SAP T-CODE
MM FLOW , SD FLOW , SE11,SE18 ,SE24,SE30, SM12,ST22, SE41, SE51, SE80,SE84
SE90,SE10,SE09,SE03,
Getway T-Code
/IWFND/GW_CLIENT
/IWFND/ERROR_LOG
/IWFND/APPS_LOG
/IWBEP/VIEW_LOG
/IWFND/CACHE_CLEANUP
/IWFND/TRACES
*********************************************************************************
Comments
Post a Comment