cancel
Showing results for 
Search instead for 
Did you mean: 

Data Not Retriverd from Z Table

Former Member
0 Kudos

when i enter material 12345 in my Ztable thru SE16 Txn.

the data doesn't come.

but when i enter 12345* in Matnr field then the data is displayed

ny clues...

abhishek

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi again,

1. What is the ACTUAL - FULL material number

000000000000012345

or

12345 x.y.z....

2. Secondly, how is it stored

in your Z Table (not in mara table)

Is it saved properly.

ie with Left Padded zeroes?

or simply 12345.

regards,

amit m.

Former Member
0 Kudos

hi amit if we see in MAKT table

the Material is 000000000000012345

now if i browse my Ztab table

the matnr field contains only 12345 (no zeroes)

former_member188685
Active Contributor
0 Kudos

hi abhi,

how are you filling ztable. (i mean how are you populating the data to the table).

regards

vijay

Former Member
0 Kudos

Hi again,

1. Ya, thats the problem !!!

2. Now first check out the Z Table

the MATNR field of it

should have data element MATNR Only !

(In fact it should have been that

from the beggining only)

3. If u have changed it now,

then u need to populate the

data in Z Table once again

so that correct format

goes in it

ie. 0000000012345

and not simply 12345.

4. So, First try to correct your data

in Z Table

by using some abap code or any other method.

5. U may temporary write a program

to do so,

and then check further.

6. BCOS i tried the same thing here

and it works fantastic !

regards,

amit m.

Former Member
0 Kudos

hi amit

that means i have to update my Z table with leading Zeroes in the MATNR Field and also at the time of save i have to save with leading zeroes....

former_member188685
Active Contributor
0 Kudos

hi abhishek,

you should upload the data in that way only, and saving also should in proper format, then only the data comes properly for selection.

regards

vijay

Former Member
0 Kudos

Hi Abhishek,

1. First of all check the Z Table field

for material number.

The DATA ELEMENT of it should be

MATNR (as in MARA Table)

2. 12345

What is the exact material code ?

if it is 00000000012345

then it will work !

3. The data element (and corresponding domain )

is important so that

when we write 12345,

then,

internally abap translates it to

0000000000012345

in SQL so that

it is found in database table.

(in database table it is stored as

00000000000012345 and not simply 12345,

hence, at the database level,

000000000001234 is required in WHERE condition

and not simply 12345

-


this conversion is done automatically

by the system

-


when a) showing on the screen

b) when communicating with the database

regards,

amit .

Message was edited by: Amit Mittal

Former Member
0 Kudos

the data element is MATNR as in MARA Table

when i have to fetch the data from the Z table against the Material. i have to write query like this

select matnr into vl_matnr from ztab where matnr like 'v_matnr%'.

i have also use the Converison Input function also but that also doesn't work as u know using like statement will slow down my query.....

former_member188685
Active Contributor
0 Kudos

Hi Abhishek,

how are you populating v_matnr,

can you show that..

regards

vijay

Former Member
0 Kudos

Hi again,

1. select matnr into vl_matnr from ztab where matnr

= p_matnr

2. On selection scren the p_matnr

should be LIKE MARA-MATNR.

regards,

amit m.

Former Member
0 Kudos

AMit

using this query gives me no result..

select matnr into vl_matnr from ztab where matnr 
= p_matnr.

but if i do like this

concatenate p_matnr '%' into p_matnr.

and then write query like this

select matnr into vl_matnr from ztab where matnr 
like p_matnr.

<b>then the Result comes</b>

this i am doing in a loop just giving u the code where problem comed...

abhishek

Message was edited by: Abhishek Suppal

former_member188685
Active Contributor
0 Kudos

Hi Abishek,

how you declared paramaterp_matnr.

that might be the problem..

regards

vijay

Former Member
0 Kudos

hi vijay

data : p_matnr like ztab-matnr.

abhishek

former_member188685
Active Contributor
0 Kudos

change this to

data : p_matnr like mara-matnr.

Former Member
0 Kudos

hi vijay

i have done that also but it didn't work out

abhishek

former_member188685
Active Contributor
0 Kudos

Hi,

is it is having standard MATNR domain ot Z* domian.

and 12345 is the material or something else is there

with it i mean 12345xxx some thing like this..

regards

vijay

if it is Z domain then you need to attach alpha routines(conversion)