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

Data not selected from ztable

Former Member
0 Likes
3,026

Dear all

I have ztable as below :

FieldName DataElement Type Length

coilno coilno char 10

ordno vbeln char 10

-


-


when i am searching data from this table based on coilno, then data can be retreived from table but when i search same data based on ordno only then no data shows. but its sure data exists there, i have checked. domain of vbeln is same in my ztable and vbap table. kindly provide solution. thanks in advance.

Dear all

I have ztable as below :

FieldName DataElement Type Length

coilno coilno char 10

ordno vbeln char 10

-


-


when i am searching data from this table based on coilno, then data can be retreived from table but when i search same data based on ordno only then no data shows. but its sure data exists there, i have checked. domain of vbeln is same in my ztable and vbap table. kindly provide solution. thanks in advance.

21 REPLIES 21
Read only

alex_cook
Active Participant
0 Likes
2,946

Howdy,

Make sure you are searching with leading zeros, eg instead of VBELN = 12345678, use VBELN = 0012345678.

Try using function module CONVERSION_EXIT_ALPHA_INPUT to insert the leading zeros.

Cheers

Alex

Read only

Former Member
0 Likes
2,946

i have already try this. but in case of data searching in vbap table we need not to add zeros in vbeln field. even if we add zeros , zeros eliminates. i need to develop important report based on this search criteria. kindly provide solution.

Read only

Former Member
0 Likes
2,946

You can use it in REport by using this Function module for remove leading zero

CONVERSION_EXIT_ALPHA_INPUT

CONVERSION_EXIT_ALPHA_OUTPUT

Try this on Goto Se11-->table name >display->table content(Ctrlshiftf10)>In menu settings>user parameter>Data browser tab>Check conversion Exist enable and try

Thanks

Read only

matt
Active Contributor
0 Likes
2,946

>

> i have already try this. but in case of data searching in vbap table we need not to add zeros in vbeln field. even if we add zeros , zeros eliminates. i need to develop important report based on this search criteria. kindly provide solution.

That's probably because you are seeing the conversion exit converting your zeros. If you are unable to SELECT data from the database, and you know the data is there, it is almost certainly because you need to use a conversion exit in your program.

Have you tried it?

matt

Read only

Former Member
0 Likes
2,946

My Dear

problem is not of leading or trailing zeros. in se11 when i am tring to select record based of ordno field it does not shwo data and based on coilno is shows .in database data is not stored with leading zeros.

in program i am using following very simple query. i have tried with parameter and also with range option. but no result.

DATA : BEGIN OF itab occurs 0.

include structure zhrordlink.

DATA : END OF itab.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

SELECT-OPTIONS : mordno FOR zhrordlink-ordno.

*parameters : mord like zhrordlink-ordno.

SELECTION-SCREEN END OF BLOCK b1.

select * from zhrordlink into corresponding fields of itab

where ordno in mordno.

endselect.

loop at itab.

write:/1 itab-ordno.

endloop.

Read only

Former Member
0 Likes
2,946

Weird...I tried creating a custom table using Domian used for VBELN and other fields.It shows data if it exists in table.

Well if you are using the domain used for VBELN ,then the conversion will work and in the DATABASE table the data will contain the leading zeroes.

Give us the table look out and the table output which you are trying to get using ORDNO.

Read only

matt
Active Contributor
0 Likes
2,946

>

> My Dear

> problem is not of leading or trailing zeros. in se11 when i am tring to select record based of ordno field it does not shwo data and based on coilno is shows .in database data is not stored with leading zeros.

> in program i am using following very simple query. i have tried with parameter and also with range option. but no result.

>

> DATA : BEGIN OF itab occurs 0.

> include structure zhrordlink.

> DATA : END OF itab.

>

> SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

> SELECT-OPTIONS : mordno FOR zhrordlink-ordno.

> *parameters : mord like zhrordlink-ordno.

> SELECTION-SCREEN END OF BLOCK b1.

>

> select * from zhrordlink into corresponding fields of itab

> where ordno in mordno.

> endselect.

>

> loop at itab.

> write:/1 itab-ordno.

> endloop.

Your code is wrong. You are selecting into the work area of the internal table. NOT the internal table itself.

DATA : itab TYPE STANDARD TABLE OF zhrordlink,
      wa TYPE zhrordlink.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : mordno FOR zhrordlink-ordno.
*parameters : mord like zhrordlink-ordno.
SELECTION-SCREEN END OF BLOCK b1.

select * from zhrordlink into corresponding fields of TABLE itab
where ordno in mordno.

loop at itab INTO wa.
write:/1 wa-ordno.
endloop.

Don't use tables with header-lines. It is old and bad practice.

Edited by: Matt on Sep 22, 2010 11:55 AM

Read only

Former Member
0 Likes
2,946

dear matt

by using your code, still no result found. confused!!!! why so ?

Read only

matt
Active Contributor
0 Likes
2,946

Run it with the select-option blank.

matt

Read only

Former Member
0 Likes
2,946

with select option blank, it works fine. but i need selective orders data. how it ca be possible? regards

Read only

matt
Active Contributor
0 Likes
2,946

Put a breakpoint at the SELECT, run the program and see what is in the table MORDNO. Hint - in the debugger use mordno[] to examine the table contents.

Read only

Former Member
0 Likes
2,946

Hi

In SE11 you check with/without zero based on oreder no or check your data element of orderno having any conversion routine or not?

For conversion routin please enable the tick button as previous post i have mentioned.

if it is not debug the coding and check the select option ranges

Read only

Former Member
0 Likes
2,946

i put two values 15756 and 4500012345. it shows 0000015756 and 4500012345.

Read only

matt
Active Contributor
0 Likes
2,946

How are you getting data into the table?

Read only

Former Member
0 Likes
2,946

option mentioned by you already CHECKED. also order number which i am puting in selection range exist in table . ???

Read only

Former Member
0 Likes
2,946

data is enterd into table thru screen used by end users.

Read only

Former Member
0 Likes
2,946

can we come on chat to understand the query ?

Read only

matt
Active Contributor
0 Likes
2,946

No. All discussions are to be carried out on line in accordance with the rules of engagement. The problem you are facing is that you have conversion exits on your table. The program you have written is using those conversion exits. When you enter 15756 into the select option, this is correctly converted to 0000015756. The select fails to find 0000015756, which shows that that number does not exist in your table. The problem must therefore lie in the data entry program. It seems when the users enter 15756, that that is what is stored in your table - instead of 0000015756.

You must make sure that all your interactions with the table refer to the correct type.

Read only

Former Member
0 Likes
2,946

dear matt

following is table description, all these fields are key field and not null, also some more non key fileds are there in this table.

Field KeyInitData element Data TyLengthDecimaShort Description

MANDT MANDT CLNT 3 0 Client

COILNO ZCOILNO CHAR 10 0 Coil No

SLITID CHAR 1 0 SLIT ID

ORDNO VBELN CHAR 10 0 Sales and Distribution Document Number

LINENUM POSNR NUMC 6 0 Item number of the SD document

i have tried with creating new table by copying this table and entered data manual in this table and selection is ok. is there any possibility of something wrong in dialog program (Zscreen) through which user enters data. kindly suggest solution. report required by higher management on top priority. regards

Read only

matt
Active Contributor
0 Likes
2,946

Exactly. There may be something wrong with the dialog program. The definition of the field which the users type the data into probably doesn't have a conversion exit on it. Check what dataelement that field is using in the dialog program. Also check the definition of the field in the screen editor.

Further, is the data new? You may simply be reading old, bad data. Enter some new data via the dialog and see whether you get the same problem.

Read only

Former Member
0 Likes
2,946

Could you post the Select query you have coded.