Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

start routine not working.

Former Member
0 Likes
1,281

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?

13 REPLIES 13
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,237

Does TEMPLINE have the same exact structure as INT_EMP?

Regards,

Rich Heilman

Read only

0 Likes
1,237

Yes, this is what I have

DATA: TEMPLINE LIKE LINE OF INT_EMP.

Read only

0 Likes
1,237

Have you debugged yet?

Regards,

Rich Heilman

Read only

SantoshKallem
Active Contributor
0 Likes
1,237

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

Read only

0 Likes
1,237

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?

Read only

SantoshKallem
Active Contributor
0 Likes
1,237

check it with loop.

for debugging, place the cursor on read table and press stop button(red one) and execute it.

Read only

0 Likes
1,237

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.

Read only

0 Likes
1,237

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?

Read only

Former Member
0 Likes
1,237

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

Read only

0 Likes
1,237

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.

Read only

0 Likes
1,237

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

Read only

0 Likes
1,237

I did that and gave the values exactly as they appear in se16 but still no luck.

Read only

0 Likes
1,237

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