Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

start routine.

Hi,

Please some one help me to understand these code line by line.

REFRESH: G_T_ERRORLOG, T_ERRORLOG.

LOOP AT DATAPAK INTO S_DATA.

ASSIGN COMPONENT 4 OF STRUCTURE S_DATA TO <FS>.

V_RECNO = <FS>.

REFRESH T_MONITOR.

CALL FUNCTION 'Z_BW_FILTER_NOT_ALLOWED_CHARS'

TABLES

T_MONITOR = T_MONITOR

CHANGING

V_ALLOWED_CHAR = V_ALLOWED_CHAR

V_STRING = S_DATA-/BIC/NKCBC_T2.

MODIFY DATAPAK FROM S_DATA.

IF NOT T_MONITOR[] IS INITIAL.

LOOP AT T_MONITOR INTO S_MONITOR.

S_ERRORLOG-RECORD = V_RECNO.

S_ERRORLOG-MSGTY = S_MONITOR-MSGTY.

S_ERRORLOG-MSGID = S_MONITOR-MSGID.

S_ERRORLOG-MSGNO = S_MONITOR-MSGNO.

S_ERRORLOG-MSGV1 = S_MONITOR-MSGV1.

APPEND S_ERRORLOG TO T_ERRORLOG.

ENDLOOP.

ENDIF.

ENDLOOP.

SORT T_ERRORLOG BY MSGTY MSGID MSGNO MSGV1.

DELETE ADJACENT DUPLICATES FROM T_ERRORLOG

COMPARING MSGTY MSGID MSGNO MSGV1.

APPEND LINES OF T_ERRORLOG TO G_T_ERRORLOG.

*KIN122150-RSAIN1-20050816 Insert Begin

*********Currency conversion for NKRETPRI starts*******************

IF NOT DATAPAK[] IS INITIAL.

LOOP AT DATAPAK INTO S_DATAPAK.

CLEAR V_INDEX.

V_INDEX = SY-TABIX.

IF S_DATAPAK-/BIC/NKRETPRI CO ' 0123456789.'.

CLEAR: V_AMOUNT, V_PRC.

V_AMOUNT = S_DATAPAK-/BIC/NKRETPRI.

CALL FUNCTION 'RSAR_CURRENCY_CONVERT'

EXPORTING

I_CURRENCY = S_DATAPAK-CURRENCY

CHANGING

C_AMOUNT = V_AMOUNT.

.

V_PRC = V_AMOUNT.

S_DATAPAK-/BIC/NKRETPRI = V_PRC.

ENDIF.

*********Currency conversion for NKRETPRI ends*********************

*********Currency conversion for NKWHLPRCE starts******************

IF S_DATAPAK-/BIC/NKWHLPRCE CO ' 0123456789.'.

CLEAR: V_AMOUNT1, V_PRC1.

V_AMOUNT1 = S_DATAPAK-/BIC/NKWHLPRCE.

CALL FUNCTION 'RSAR_CURRENCY_CONVERT'

EXPORTING

I_CURRENCY = S_DATAPAK-CURRENCY

CHANGING

C_AMOUNT = V_AMOUNT1.

.

V_PRC1 = V_AMOUNT1.

S_DATAPAK-/BIC/NKWHLPRCE = V_PRC1.

ENDIF.

*********Currency conversion for NKWHLPRCE ends******************

**********Replace NKBLNKFLG with 'N' for blanks *******************

IF S_DATAPAK-/BIC/NKBLNKFLG IS INITIAL.

S_DATAPAK-/BIC/NKBLNKFLG = 'N'.

ENDIF.

**********Translate NKSZRANGE to uppercase ************************

TRANSLATE S_DATAPAK-/BIC/NKSZRANGE TO UPPER CASE.

  • KIN182130-ABILAK-20070427 Insert Begin:

  • If 0Currency is empty then populate it with whole sale price currency

IF S_DATAPAK-CURRENCY IS INITIAL.

S_DATAPAK-CURRENCY = S_DATAPAK-WHLPRCCURR.

ENDIF.

  • KIN182130-ABILAK-20070427 Insert End.

MODIFY DATAPAK FROM S_DATAPAK INDEX V_INDEX TRANSPORTING

/BIC/NKRETPRI /BIC/NKWHLPRCE /BIC/NKBLNKFLG

  • KIN182130-ABILAK-20070427 Insert Begin:

CURRENCY

  • KIN182130-ABILAK-20070427 Insert End.

*TPR47475-RSAIN1-20050921 Insert Begin

/BIC/NKSZRANGE.

*TPR47475-RSAIN1-20050921 Insert End

ENDLOOP.

ENDIF.

*KIN122150-RSAIN1-20050816 Insert End

************Include to load the TODS*************

INCLUDE ZBWD_TODS_TR.

  • abort <> 0 means skip whole data package !!!

ABORT = 0.

Please help me.

Thanks

Not what you were looking for? View more on this topic or Ask a question