2010 Sep 22 6:01 AM
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.
2010 Sep 22 6:05 AM
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
2010 Sep 22 7:07 AM
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.
2010 Sep 22 7:16 AM
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
2010 Sep 22 8:59 AM
>
> 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
2010 Sep 22 10:39 AM
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.
2010 Sep 22 10:53 AM
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.
2010 Sep 22 10:54 AM
>
> 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
2010 Sep 22 11:03 AM
dear matt
by using your code, still no result found. confused!!!! why so ?
2010 Sep 22 11:12 AM
2010 Sep 22 11:18 AM
with select option blank, it works fine. but i need selective orders data. how it ca be possible? regards
2010 Sep 22 11:21 AM
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.
2010 Sep 22 11:28 AM
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
2010 Sep 22 11:47 AM
i put two values 15756 and 4500012345. it shows 0000015756 and 4500012345.
2010 Sep 22 11:49 AM
2010 Sep 22 12:00 PM
option mentioned by you already CHECKED. also order number which i am puting in selection range exist in table . ???
2010 Sep 22 12:01 PM
2010 Sep 22 12:02 PM
2010 Sep 22 12:07 PM
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.
2010 Sep 24 5:52 AM
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
2010 Sep 24 6:39 AM
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.
2010 Sep 22 9:45 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |