Application Development 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: 

Problem with domain with different output length

Former Member
0 Kudos
284

I am fetching records from <b>AUAA</b> table. There I have to check [EMTYP] field = 'ORD'. Here my code is as follows which is creating performance issue.

SORT iaufnr BY aufnr.

DELETE ADJACENT DUPLICATES FROM iaufnr.

SELECT aufnr belnr

FROM auaa

INTO TABLE iauaa

FOR ALL ENTRIES IN iaufnr

WHERE aufnr = iaufnr-aufnr

AND emtyp = 'ORD' .

I tried by putting a char field in iaufnr but domain of element KONTY which is used in EMTYP field is having length 2 & output length 3.

Any solution for this?

Regards,

Dilip

6 REPLIES 6

jayanthi_jayaraman
Active Contributor
0 Kudos
101

Hi,

Just give the type as AUAA-EMTYP for that field.I think it will take care.

0 Kudos
101

Hi Jayanthi,

That I have tried earlier but it is not working. Iwant emtyp value 'ORD' but there also it is giving me this error: <b>The value specification is longer than the corresponding field. The value specifications will only be passed upto the length of the field</b>

This is my internal table :

data BEGIN OF iaufnr OCCURS 5,

aufnr LIKE mseg-aufnr,

sernr LIKE objk-sernr,

matnr LIKE mseg-matnr,

dmbtr LIKE mseg-dmbtr,

bwart LIKE mseg-bwart,

vbtyp LIKE VBRK-VBTYP,

emtyp type AUAA-EMTYP value 'ORD',

END OF iaufnr.

0 Kudos
101

Hi,

Use this FM CONVERSION_EXIT_OBART_INPUT to convert ORT to 2 character.That's give ORT as input to this FM in se37.

Then use the two character output in where condition

SELECT *

FROM auaa

INTO TABLE iauaa

where emtyp eq 'OR'."two chacter

It will work.

You can identify those type of exits by double clicking the domain.

Problem solved?

Message was edited by: Jayanthi Jayaraman

0 Kudos
101

Hi Dilip,

Can you try the way I have explained?

Thanks

Vinod

Former Member
0 Kudos
101

try this logic, may it work

SORT iaufnr BY aufnr.

DELETE ADJACENT DUPLICATES FROM iaufnr comparing aufnr.

SELECT aufnr belnr

FROM auaa

INTO TABLE iauaa

FOR ALL ENTRIES IN iaufnr

WHERE aufnr = iaufnr-aufnr.

loop at iauaa.

delete iauaa where iauaa <> 'ORD'.

enloop.

regards

Vinod_Chandran
Active Contributor
0 Kudos
101

Hi Dilip,

The field AUFNR has a converstion exit ALPHA. This means that if the value of AUFNR is 123456789, in the database it will be stored as 000123456789. The length of this field is 12. So in your internal table, the field AUFNR must contain prefix zero if the lenght is less than 12.

The same way the field EMTYP has a conversion exit OBART.

I think instead of 'ORD', you have to 'OR'.

Thanks

Vinod