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

issue while fetching data from rbkp table

Former Member
0 Likes
1,366

Hi Experts ,

                  i have an strange situation, when i am trying to fetch data from rbkp table passing company code and posting date , i am not getting any records, according to my knowledge , select statement is correct.,while i checked in se11 with same inputs, it is showing records.

where am i going wrong,

i am attaching the both screen shots.please check.help required.

1 ACCEPTED SOLUTION
Read only

perfectoromero
Explorer
0 Likes
1,268

Validate if the P_LIFNR is empty, because if that is true, your parameter set the value in P_LIFNR = '' and search this in the database.

Option 1: Set P_LIFNR as an obligatory parameter

                         p_lifnr type bsik-lifnr obligatory


Option 2: Validate P_LIFNR is empty

                         if p_lifnr is initial.

                                   select ... 

                                   where ...

                         else.

                                   select ...

                                   where LIFNR = P_LIFNR.


Option 3: Convert the P_LIFNR as a Select-Option, you need to change the "=" to "IN" instruction in Where.


Best Regards,      

Francisco Romero

4 REPLIES 4
Read only

Former Member
0 Likes
1,268

No - the selection conditions are not the same in both cases. In your program, you using P_LIFNR, but not in the data browser. I suspect that P_LIFNR is blank in the program and that is why you do not get any records.

Or if P_LIFNR is a SELECT-OPTION, you cannot use "=".

Rob

Message was edited by: Rob Burbank

Read only

philipdavy
Contributor
0 Likes
1,268
  • Conversion Exit issue for the field LIFNR ?
  • Did you try CONVERSION_EXIT_ALPHA_INPUT ?

Regards,

Philip.

Read only

perfectoromero
Explorer
0 Likes
1,269

Validate if the P_LIFNR is empty, because if that is true, your parameter set the value in P_LIFNR = '' and search this in the database.

Option 1: Set P_LIFNR as an obligatory parameter

                         p_lifnr type bsik-lifnr obligatory


Option 2: Validate P_LIFNR is empty

                         if p_lifnr is initial.

                                   select ... 

                                   where ...

                         else.

                                   select ...

                                   where LIFNR = P_LIFNR.


Option 3: Convert the P_LIFNR as a Select-Option, you need to change the "=" to "IN" instruction in Where.


Best Regards,      

Francisco Romero

Read only

atul_mohanty
Active Contributor
0 Likes
1,268

Hi -

In your code, you have P_BELNR, P_BUKRS, P_LIFNR is mentioned. If P_BUKRS or P_LIFNR are parameters it will cause the issue. You need make these fields mandatory for your case.