2006 Dec 27 6:47 PM
I created a start routine and filled the internal table with the attributes I want to load. Then in the transfer routine, I wrote this code. It doesn't give me any syntax errors and the load finishes but the values are not being sent. Here is the transfer routine code:
READ TABLE INT_EMP INTO TEMPLINE WITH KEY FAC = TRAN_STRUCTURE-FACID.
IF SY-SUBRC EQ 0.
RESULT = TEMPLINE-EMPN.
ENDIF.
Why are my values not being passed?
I created a start routine and filled the internal table with the attributes I want to load. Then in the transfer routine, I wrote this code. It doesn't give me any syntax errors and the load finishes but the values are not being sent. Here is the transfer routine code:
READ TABLE INT_EMP INTO TEMPLINE WITH KEY FAC = TRAN_STRUCTURE-FACID.
IF SY-SUBRC EQ 0.
RESULT = TEMPLINE-EMPN.
ENDIF.
Why are my values not being passed?
2006 Dec 27 7:15 PM
2006 Dec 27 7:19 PM
Yes, this is what I have
DATA: TEMPLINE LIKE LINE OF INT_EMP.
2006 Dec 27 7:20 PM
2006 Dec 27 7:22 PM
LOOP AT TRAN_STRUCTURE.
READ TABLE INT_EMP INTO TEMPLINE WITH KEY FAC = TRAN_STRUCTURE-FACID.
IF SY-SUBRC EQ 0.
RESULT = TEMPLINE-EMPN.
ENDIF.
ENDLOOP
2006 Dec 27 7:23 PM
I haven't debugged. How do I do that?
Sontosh, do I need a loop? I am getting it line by line in the transfer structure right?
2006 Dec 27 7:28 PM
check it with loop.
for debugging, place the cursor on read table and press stop button(red one) and execute it.
2006 Dec 27 7:52 PM
When I try the loop, it gives me this error:
"TRAN_STRUCTURE" is neither specified under "TABLES" nor is it defined as an internal table.
2006 Dec 27 8:19 PM
Also, when I go to the debug mode, I don't see the code that I wrote there. The internal table cannot be found. Why is that?
2006 Dec 27 8:53 PM
Hi Uday,
Have you populated the internal table INT_EMP in the start routine?. If populated correctly, next check is any data is matching with TRAN_STRUCTURE-FACID.
Alternatively, pass some constant value inside the if condition (given below) and check whether constant gets populated.
READ TABLE INT_EMP INTO TEMPLINE WITH KEY FAC = TRAN_STRUCTURE-FACID.
IF SY-SUBRC EQ 0.
RESULT = 'checking value'.
ENDIF.
The above checks may help you to identify the root cause.
Thanks
Viswa
2006 Dec 27 9:33 PM
Yes, I am defining the INT_EMP in the start routine and populating it. I tried to pass a constant value in the transfer routine but it did not work. So I think the INT_EMP table is not being filled correctly. I am not sure what I am doing wrong. Here is the code:
SELECT EMPLOYEE PROFIT_CTR INTO CORRESPONDING FIELDS OF TABLE INT_EMP
FROM /BI0/QEMPLOYEE WHERE JOB = '9000332' AND DATETO = '99991231'.
LOOP AT INT_EMP INTO WA.
MOVE WA-FAC TO STR1.
STR2 = STR1+0(4).
SEARCH STR2 FOR ' ' STARTING AT 1 ENDING AT 1.
IF SY-SUBRC EQ 0.
REPLACE ' ' WITH '0' INTO STR2.
ENDIF.
MOVE STR2 TO WA-FAC.
MODIFY TABLE INT_EMP FROM WA.
ENDLOOP.
2006 Dec 27 10:19 PM
Go to SE16 and for the table /BI0/QEMPLOYEE, input the filter conditions (JOB = '9000332' AND DATETO = '99991231') manually and see whether it brings data. If it brings data, then look at the values in 'SE16 Standard Display' mode (user parameters) instead of ALV Grid. Probably I guess, Job may have Zeros as prefix.
Map it exactly in the where condition how you see it in SE16 .
Thanks
Viswa
2006 Dec 27 10:34 PM
I did that and gave the values exactly as they appear in se16 but still no luck.
2006 Dec 27 11:02 PM
I guess, you are using PSA method. In such case, make the request as RED in RSMO. Delete it from the target. Go to RSMO and select any data packet and choose option for Simulate. It will throw a window where you can select 'Debugging in Update rule'. This will help you to dig further. By the way, you should raise it in BI not in ABAP forum.
Thanks
Viswa
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |