Application Development 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: 

Need urgent help

Aummad
Participant
0 Kudos

Hi,

i need help to to understand of the following code

TYPES: BEGIN OF type_pf_key,

/bic/nicustpfn TYPE /bic/assdogpf100-/bic/nicustpfn,

distr_chan TYPE /bic/assdogpf100-distr_chan,

division TYPE /bic/assdogpf100-division,

salesorg TYPE /bic/assdogpf100-salesorg,

/bic/nkpartctr TYPE /bic/assdogpf100-/bic/nkpartctr,

END OF type_pf_key.

DATA t_g_output TYPE STANDARD TABLE OF /bic/assdogpf200.

DATA s_g_output TYPE /bic/assdogpf200.

DATA: g_count TYPE i.

$$ end of global - insert your declaration only before this line -

FORM compute_data_field

TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring

USING COMM_STRUCTURE LIKE /BIC/CS8SSDOGPF1

RECORD_NO LIKE SY-TABIX

RECORD_ALL LIKE SY-TABIX

SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS

CHANGING RESULT LIKE /BIC/ASSDOGPF200-SHIP_TO

RETURNCODE LIKE SY-SUBRC "Do not use!

ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update

*

$$ begin of routine - insert your code only below this line -

  • fill the internal table "MONITOR", to make monitor entries

  • result value of the routine

if g_count <> RECORD_NO.

g_count = RECORD_NO.

read table t_g_output into s_g_output index RECORD_NO.

if sy-subrc = 0.

RESULT = s_g_output-ship_to.

endif.

else.

RESULT = s_g_output-ship_to.

endif.

  • if abort is not equal zero, the update process will be canceled

ABORT = 0.

$$ end of routine - insert your code only before this line -

*

ENDFORM.

Please reply me,

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Well, is only a form, is barely understandable without the calling routine. This is the only things I suppose


if g_count RECORD_NO.
"If the global variable g_count is ne (i supposse the forum eated that condition) to the record_no,
" I suppose this is the sy-tabix pass of a loop
g_count = RECORD_NO.
"g_count takes the value of that record number
read table t_g_output into s_g_output index RECORD_NO.
"You read table t_g_output into the work area in the index record_no.
if sy-subrc = 0.
RESULT = s_g_output-ship_to.
"If there is a record in that index, result takes the value of the work area
endif.
else.
"If g_count is equal to Record_no
RESULT = s_g_output-ship_to.
"Result takes the value passed to the form
endif.

1 REPLY 1

Former Member
0 Kudos

Well, is only a form, is barely understandable without the calling routine. This is the only things I suppose


if g_count RECORD_NO.
"If the global variable g_count is ne (i supposse the forum eated that condition) to the record_no,
" I suppose this is the sy-tabix pass of a loop
g_count = RECORD_NO.
"g_count takes the value of that record number
read table t_g_output into s_g_output index RECORD_NO.
"You read table t_g_output into the work area in the index record_no.
if sy-subrc = 0.
RESULT = s_g_output-ship_to.
"If there is a record in that index, result takes the value of the work area
endif.
else.
"If g_count is equal to Record_no
RESULT = s_g_output-ship_to.
"Result takes the value passed to the form
endif.