‎2008 Mar 10 12:29 PM
what does this mean
NOT t_salesdoc-matkl IN s_matkl
and also what could be the meaning of this
IF p_pcnt01 IS INITIAL.
IF t_salesdoc-faksk IS INITIAL.
t_salesdoc-faksk = k_01.
ENDIF.
t_salesdoc-no_percent = k_x.
READ TABLE i_vbpa WITH KEY vbeln = t_salesdoc-vbeln.
IF sy-subrc = 0.
IF lv_flag IS INITIAL.
WRITE: 'Pricing adjustment for Credit memo amount (A/R)'.
SKIP.
lv_flag = 'X'.
ENDIF.
WRITE: / 'Order:'(004),t_salesdoc-vbeln, t_salesdoc-posnr,
'Customer:'(005),i_vbpa-kunnr,
'CM Method:'(100),t_salesdoc-katr5,
'Pricing method missing'(006).
ENDIF.
‎2008 Mar 10 12:35 PM
Means
If t_salesdoc-matkl is not IN s_matkl ..
IF there is no value in p_pcnt01 ( p_pcnt01 is initial )
IF there is no value in t_salesdoc-faksk ( t_salesdoc-faksk is initial )
‎2008 Mar 10 12:35 PM
NOT t_salesdoc-matkl IN s_matkl => excluding the values in s_matkl
t_salesdoc-faksk = K_01 if p_pcnt01 and t_salesdoc-faksk are not having any values(INITIAL)
and
t_salesdoc-no_percent = k_x.
READ TABLE i_vbpa WITH KEY vbeln = t_salesdoc-vbeln.
IF sy-subrc = 0.
IF lv_flag IS INITIAL.
WRITE: 'Pricing adjustment for Credit memo amount (A/R)'.
SKIP.
lv_flag = 'X'. " this is for writing the above only for the first time
ENDIF.
Regards
Raj
‎2008 Mar 10 12:44 PM
Hi,
1.NOT t_salesdoc-matkl IN s_matkl
means
t_salesdoc-matkl should not be there in s_matkl
2.IF p_pcnt01 IS INITIAL.
IF t_salesdoc-faksk IS INITIAL
means
if p_pcnt01 has no value
and
if t_salesdoc-faksk has no value.
3.IF lv_flag IS INITIAL
means
lv_flag has no value or initial value ie to check whether the flag is set or not.
Reward if helpful.
Regards.
‎2008 Mar 10 12:52 PM
Hi,
The first statement is same as v1 must not be in s_v2.So it will check for whether or not that variable is in the select-options or not.Only if the variable is not there,will it proceed further.
The rest I think is self explanatory.
Hope it is useful,
Thanks,
Sandeep.