‎2010 Mar 04 9:52 AM
Hi Experts,
I need clarification regarding the following statement.
IF lv_temp EQ 's'.
lv_wbs_temp = prps-posid+0(12).
endif.
The above if condition while check whether that 12th character is 's' or not. If not,please provide your solutions.
Best Regards,
Bharat.
‎2010 Mar 04 9:57 AM
Hi,
IF lv_temp EQ 's'. "Will check for lower case value 's'
lv_wbs_temp = prps-posid+0(12). "Will move the first 12 characters from prps-posid to lv_wbs_temp.
endif.
Please make your question more clear
‎2010 Mar 04 10:01 AM
The above if condition while check whether that 12th character is 's' or not.
IF lv_temp EQ 's'.
lv_wbs_temp = prps-posid+0(12).
endif.
IF lv_temp EQ 's'.
lv_wbs_temp = prps-posid+11(1) ."this will check if 12 character is 's' i.e small s ..
endif.
br,
Vijay.
‎2010 Mar 04 10:05 AM
There is no check happening for the 12th character in the specified code.
It just moves the value based on Offset position.
‎2010 Mar 04 10:11 AM
yeah .keshav . i was about to alter my answer but system went for a reboot
the comparision she is looking for is a match to 's' but no where it was looking for 12 character ..
//IF lv_temp EQ 's'.
lv_wbs_temp = prps-posid+11(1) ."this will check if 12 character is 's' i.e small s ..
//endif.
instead it should be the first case like
if psps-posid+11(1) = 's' . makes sense that 12 character is 's' .. question was not clear ..
Br,
Vijay
‎2010 Mar 04 10:45 AM
Hi All,
After checking above condition. it has move in to the variable .
so in my report i have to declare as
lv_wbs_temp = prps-posid+0(11).
or
lv_wbs_temp = prps-posid+11(1).
Need ur suggestion to solve the problem.
‎2010 Mar 04 10:54 AM
lv_wbs_temp = prps-posid+0(11).
This will send first 11 characters of prps-posid to that variable.
lv_wbs_temp = prps-posid+11(1).
This will send only 12th character of prps-posid to that variable.
‎2010 Mar 04 10:59 AM
Hello,
As mentioned above for
lv_wbs_temp = prps-posid+0(11). - copy first 11 characters from prps-posid into the variable
For
lv_wbs_temp = prps-posid+11(1) - it will copy 1 character on the 12th position.
Regards,
Sachin
‎2010 Mar 04 10:10 AM
Hi Bharat,
The code checks whether lv_temp = 's' and not whether the 12th character of lv_temp is equal to s.
If you want to check the 12th Character of lv_temp, the code should be as follows:
if lv_temp+11(1) = 's'.
...
endif.
Secondly, the statement:
lv_wbs_temp = prps-posid+0(12).
will move the first twelve characters of prps-posid into lv_wbs_temp.
If you want only the twelfth character to be moved, use this statement:
lv_wbs_temp = prps-posid+11(1).
Hope this helps! Please revert if you need anything else!!
Cheers,
Shailesh.
Always provide feedback for helpful answers
‎2010 Mar 04 5:49 PM
I think you're tyring to say....
if prps-posid+11(1) eq 's' .
lv_wbs_temp = prps-posid(12).
endif.
??
‎2010 Mar 04 6:14 PM
Hi,
In your code,
you are first checking whether LV_TEMP EQ 's' or not? If it is 's'then you are passing first 12 characters of PRPS-POSID to
LV_WBS_TEMP.
If you want to check whether 12th character is 's' or not, use following code:
if LV_TEMP+11(1) = 's'.
endif.
Thanks,
Hemant
‎2010 Mar 04 6:39 PM
Moderator message - Please do not ask or answer basic questions - thread locked Rob