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

Problem with Parameters or Query

Former Member
0 Likes
808

Dear Friends

i am not able to rectify the issue with following code.

SELECTION-SCREEN BEGIN OF BLOCK BK1 WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS BUKRS FOR BSEG-BUKRS OBLIGATORY.

SELECT-OPTIONS GJAHR FOR BSEG-GJAHR OBLIGATORY.

SELECT-OPTIONS SAKNR FOR BSEG-SAKNR.

SELECTION-SCREEN END OF BLOCK BK1.

SELECT BUKRS BELNR GJAHR AUGDT AUGCP AUGBL BSCHL KOART SHKZG DMBTR ZUONR SGTXT

HKONT KUNNR LIFNR FROM BSEG INTO corresponding fields of table IT_BSEG

WHERE BUKRS in BUKRS

AND SAKNR IN SAKNR

AND GJAHR in GJAHR.

if i entered bukrs , gjahr and saknr then

there is no any value inside internal table

but if i entered bukrs and gjahr then there are list of values inside internal table including saknr .

i came to know that there is some issue with saknr ??

- Avirat

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
771

Hi,

Try giving hkont instead of saknr as both fields are same.If there are no values for saknr you woill not get you can use hkont also

Regards,

Ram.

6 REPLIES 6
Read only

Former Member
0 Likes
772

Hi,

Try giving hkont instead of saknr as both fields are same.If there are no values for saknr you woill not get you can use hkont also

Regards,

Ram.

Read only

0 Likes
771

dear Sriram.S

thanks.. for the answer..

would you please give me a brief between hkont and saknr.

Regards

Avirat Patel

Read only

Former Member
0 Likes
771

Hi,

Before processing query check the value in your database table through SE16N.

Pass the 3 fields and check the whether the values are displaying or not .

Pass 2 fields and check whether it is dispalying or not .

You are passing two fields bukrs and gjahr for that no saknr value is not there thats why the data is not fetching.

You this is helpful.

Regards,

G.Aditya

Read only

Former Member
0 Likes
771

Hi ,

Try adding SAKNR feild in the select query selection fields.

Regards,

Ganesh.

Read only

GauthamV
Active Contributor
0 Likes
771

There is a conversion exit for field SAKNR.

Use below function modules accordingly.

CONVERSION_EXIT_ALPHA_INPUT

CONVERSION_EXIT_ALPHA_OUTPUT

Read only

Former Member
0 Likes
771

H Corrtech,

Please use the function module 'CONVERSION_EXIT_ALPHA_INPUT' before the select to modify the range table SAKNR as the field type is char and convers.routine (ALPHA) is attached.

conversation exit fun is used to add the preceding zero

Exp:'1234 ' --> '00001234'

Thanks

Prabhakaran