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

ABAP program is not working

Former Member
0 Likes
648

I am using ABAP stage in Datastge job and new requirement is only add a new column where the column length is 25.

Previously the program was below

   IF d_len < 16000.

      d_pack+d_offset(77) = it_1.

      d_offset = d_offset + 77.

      d_len = d_offset + 77.

but now after adding new column

change the program as

   IF d_len < 16000.

      d_pack+d_offset(102) = it_1.

      d_offset = d_offset + 102.

      d_len = d_offset + 102.

it's not working if I use below code then it works but getting data small amount with some data is shift from one colum to another.

   IF d_len < 16000.

      d_pack+d_offset(102) = it_1.

      d_offset = d_offset + 102.

      d_len = d_offset + 102.

      d_pack+d_offset(77) = it_1.

      d_offset = d_offset + 77.

      d_len = d_offset + 77.

Ant idea how to solve the issue

3 REPLIES 3
Read only

Former Member
0 Likes
552

This message was moderated.

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
552

Jason (or Sudip?), you might want to use a more descriptive subject since 'program is not working' defines probably 98% of the posts in this space.

Not sure it's possible to answer your question intelligently without seeing other parts of the program and variable definitions. How would we know the significance of all those variables and what is really happening at the end?

Have you tried running this through debugger and simply checking what effect each command has? This doesn't seem to be very complex code, although again - it's hard to tell from just one fragment.

Read only

Private_Member_7726
Active Contributor
0 Likes
552

Hi,

Just a wild guess... is this code normally not something that is generated by some IBM solution..? Meaning - something not to be messed with..? Because:

"D_LEN – Is a variable used during generation of the ABAP program. The value is set automatically based on the total length of columns in the SQL query. If this value is less than 16000, the ABAP program will concatenate the record before making an RFC call. If it is greater than 16000, each line will be a RFC call, which will create many RFC calls that will negatively effect performance." --Understanding ABAP extract data processing with InfoSphere DataStage Pack for SAP R/3 and it's perfo...


cheers

Jānis