2013 Apr 08 12:56 PM
Hi Experts,
I found this code and i am trying to understand its logic:
DATA: l_s_source_kyf TYPE rslbct_tg_stock_kyf,
l_s_target_kyf TYPE /rtf/_s_kyf.
MOVE-CORRESPONDING SOURCE_FIELDS TO l_s_source_kyf.
l_s_target_kyf-fieldnm =
if_rslbct_kyf_transform_con=>c_kyf_iss_ein_qua.
CALL METHOD (g_clnam)=>stock_adjust
EXPORTING
iv_s_source_kyf = l_s_source_kyf
CHANGING
cv_s_target_kyf = l_s_target_kyf.
RESULT = l_s_target_kyf-value_qua.
I have a question on this line:
CALL METHOD (g_clnam)=>stock_adjust
I understood that the system is calling the method g_clnam, but i don't understand the
=>stock_adjustCould someone explain me please?
Thanks.
Amine
2013 Apr 08 1:01 PM
i Believe stock_adjust is the name of static method available in class varriable (g_clnam), the class name can be identified only at runtime.
2013 Apr 08 1:01 PM
i Believe stock_adjust is the name of static method available in class varriable (g_clnam), the class name can be identified only at runtime.
2013 Apr 08 1:57 PM
g_clnam contains the name of the class for which method is implemented. since you are using => symbol that means trying to call the class method ( stock_adjust) you need to give the class name as well. Therfore
CALL METHOD (g_clnam)=>stock_adjust means that g_clnam is the class which is calling the class method stock_adjust.
Thanks & Regards
Ajit Chirania
2013 Apr 08 5:45 PM