2008 Feb 28 6:45 PM
Hi Gurus,
I am not so good in abap so can anyone help me with the coding for the logic which i have mentioned below. I want to do it in EXIT_SAPMRSRU_001. This exit for th virtual characteristics.
Create TEMP table with temp field A , Temp field B
Get Field A, pass it to temp A,
Do a search in TEMP-temp field A
if not found in temp A, copy field to temp field A , assign temp B =1
if found in temp A, copy field to temp field A , assign temp B =0
Put the above logic in a loop until final record is read.
Edited by: Alvaro Tejada Galindo on Feb 28, 2008 1:55 PM
2008 Feb 28 6:59 PM
TYPES: BEGIN OF TY_TEMP,
FIELD_A TYPE STRING,
FIELD_B TYPE STRING,
END OF TY_TEMP.
DATA: T_TEMP TYPE STANDARD TABLE OF TY_TEMP.
FIELD-SYMBOLS: <FS_TEMP> LIKE LINE OF T_TEMP.
LOOP AT T_TEMP ASSIGNING <FS_TEMP>.
IF <FS_TEMP>-FIELD_A NE PARAM_A.
<FS_TEMP>-FIELD_A = PARAM_A.
<FS_TEMP>-FIELD_B = 1.
ELSE.
<FS_TEMP>-FIELD_A = PARAM_A.
<FS_TEMP>-FIELD_B = 0.
ENDIF.
MODIFY T_TEMP FROM <FS_TEMP>.
ENDLOOP.
Modify it, according to your needs...And next time, try the code yourself first -;)
Greetings,
Blag.
Hi Gurus,
I am not so good in abap so can anyone help me with the coding for the logic which i have mentioned below. I want to do it in EXIT_SAPMRSRU_001. This exit for th virtual characteristics.
Create TEMP table with temp field A , Temp field B
Get Field A, pass it to temp A,
Do a search in TEMP-temp field A
if not found in temp A, copy field to temp field A , assign temp B =1
if found in temp A, copy field to temp field A , assign temp B =0
Put the above logic in a loop until final record is read.
Edited by: Alvaro Tejada Galindo on Feb 28, 2008 1:55 PM
2008 Feb 28 6:59 PM
TYPES: BEGIN OF TY_TEMP,
FIELD_A TYPE STRING,
FIELD_B TYPE STRING,
END OF TY_TEMP.
DATA: T_TEMP TYPE STANDARD TABLE OF TY_TEMP.
FIELD-SYMBOLS: <FS_TEMP> LIKE LINE OF T_TEMP.
LOOP AT T_TEMP ASSIGNING <FS_TEMP>.
IF <FS_TEMP>-FIELD_A NE PARAM_A.
<FS_TEMP>-FIELD_A = PARAM_A.
<FS_TEMP>-FIELD_B = 1.
ELSE.
<FS_TEMP>-FIELD_A = PARAM_A.
<FS_TEMP>-FIELD_B = 0.
ENDIF.
MODIFY T_TEMP FROM <FS_TEMP>.
ENDLOOP.
Modify it, according to your needs...And next time, try the code yourself first -;)
Greetings,
Blag.
2008 Feb 28 7:28 PM
Thank you very much. Appreciated.
Full points given.
Edited by: satish rajaram on Feb 28, 2008 2:29 PM
2008 Feb 28 8:39 PM
Hi
Your code is fine except for it is giving an error for the PARAM_A.
Field "PARAM_A" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement.
Can you please help me wat to do now. If you can help me with this that will be great.
Regards
Satish.
2008 Feb 28 8:43 PM
PARAM_A should be the field that is coming from the User-Exit...So you don't need to declare it...
EXIT_SAPMRSRU_001 doesn't exists on my system...So I can't give more details...
Greetings,
Blag.
2008 Feb 28 8:46 PM
Thank you very much for your help. i will try to get sort it out my self and let you know.
Points have been given.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |