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

Function Module problem

Former Member
0 Likes
1,448

Hello experts,

I have created a function module to replace old coding in program. Its working fine while testing for some entries but for some inputs its displaying lesser number of entries. Those entries are correct as per program but it skips some entries. If anybody have any idea regarding this issue please share it with me. Here i am attaching code for program and FM and also screen shots for function module with this discussion

This is displaying 7 entries in table but in actual there are 15 entries in program

Here is the screen shot for program

Here are entries for Function Module

If anybody have any idea regarding this issue please share it with me. I am also attaching codes for program and function module.

Thanks,

Avadhut

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,419

Hello experts,

I have done it.

Thanks

Avadhut

7 REPLIES 7
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
1,419

Hi Avadhut

Rather than putting your whole code here why dont you try and debug both program and function module in parllel sessions and find out the difference.

Nabheet

Read only

0 Likes
1,419

Hi Nabheet,

I have debugged code and adjusted code according to program. But What i want to do is FM should not work as per program there are four parameters referring to internal table in code as

  • R_VENJU = itafla
  • R_SAMAND = it_t353i_t
  • R_STARFS = it_pa_timar
  • R_STASKI = it_pa_t353i


as per the program when we select one of the parameters then more than one tables were populated but according to new requirement suppose when i select R_VENJU EQ 'X'. then only itafla should be populated. I have achieved this but for some cases FM displaying less entries.


Thanks

Avadhut

Read only

0 Likes
1,419

Avadhut

My point still is you will have to debug it to understand why some records are missing we can not tell you from here. Just switch on the debugger and debug each statement where the data is not fetched..

Nabheet

Read only

0 Likes
1,419

Hi,

Debug in parallel and set the watchpoint on final internal table for both FM & program and check at which stage number of entries are different.

Check the :

1) Select where conditions

2) Append statements

3) Delete statements.

Regards,

DPM

Read only

Former Member
0 Likes
1,420

Hello experts,

I have done it.

Thanks

Avadhut

Read only

0 Likes
1,419

Very nice...keep it up:)

Read only

0 Likes
1,419

Hi nabheet,

I have done with entries problem can you just tell me where to initialize the internal table as entries were repeating.

Thanks

Avadhut