‎2008 Jun 23 8:38 AM
Greetings Abaper's
Ive got a small problem. Ive got an IF statement and the code inside it wont execute. I debugged through it and all the parameters are met but it does not assign the short description i want to my local structure. Please help. The code snippet is included below. Thank you.
if ls_cacs_ctrtstt-appl = lv_appl
and ls_cacs_ctrtstt-ctrtst_id = ls_cacs_ctrtbu-ctrtst_id
and ls_cacs_ctrtstt-spras = 'E'.
ls_zrl_salescode_details-std_contract_desc = lt_cacs_ctrtstt-descr_short.
endif.
‎2008 Jun 23 8:41 AM
hi,
Check out whether the data type of both the variables are same or not .. for example one of numc and the other of character will not sometime satisfy the condition ... so make it of same data type ...
Regards,
Santosh
‎2008 Jun 23 8:43 AM
hi
Please check the following code
if ls_cacs_ctrtstt-appl EQ lv_appl
and ls_cacs_ctrtstt-ctrtst_id EQ ls_cacs_ctrtbu-ctrtst_id
and ls_cacs_ctrtstt-spras EQ 'E'.
ls_zrl_salescode_details-std_contract_desc = lt_cacs_ctrtstt-descr_short.
endif.
Regards,
Jaya Vani.
‎2008 Jun 23 8:45 AM
Try this:
if ls_cacs_ctrtstt-appl = lv_appl
and ls_cacs_ctrtstt-ctrtst_id = ls_cacs_ctrtbu-ctrtst_id
and ls_cacs_ctrtstt-spras = 'EN' .
ls_zrl_salescode_details-std_contract_desc = lt_cacs_ctrtstt-descr_short.
endif.
also check data typs of variables ls_cacs_ctrtstt-appl is same as lv_appl & ls_cacs_ctrtstt-ctrtst_id is same as ls_cacs_ctrtbu-ctrtst_id.
‎2008 Jun 23 8:48 AM
All data types are the same. Everything is syntactically correct and i even debugged it to see what varilables are assigned and everything looks fine except it just is not assigning anything to my local structure.
‎2008 Jun 23 8:54 AM
Language key should be EN it might be 2 characters..just check it out and laso past the values what u r passing and data type u defined for that..
Regards
sas
‎2008 Jun 23 9:07 AM
check whether the condition is getting satsfied.
Check whether any leading zeros problem is there