Skip to Content
-1

Error getting Customer Details

Aug 22, 2017 at 03:30 PM

66

avatar image
Former Member

Good day

Can anyone assist. I am trying to get customer data from KNA1 and it is not returning anything. Having looked at the data i realised for numerical customer data (KUNNR) data saved as numeric i am not getting any data returned. I think this is because the numbers are stored with leading zeros i.e Customer number 1000 will be saved as 0000001000 so when i query i do not get results. I treid using FM RPL_CUSTOMER_NAME_GET. It works well when i run it from se37 but when i ran it in ABAP it returns nothing. Below are screen shots of my code

There wont be anything in ld_pe_name1. I know some1 might have already asked this question but can you please assist we having challenges viewing sap.archive.com.

Kind Regards

Thomas

vu1mq.png (13.7 kB)
osoqv.png (15.5 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
avatar image
Former Member
Aug 22, 2017 at 05:22 PM
0

I have done a quick test and indeed the leading zeros could be the issue.

Try Function Module CONVERSION_EXIT_ALPHA_INPUT to add the leading zeros.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = return-fieldval
IMPORTING
output = KUNNR_1.

That should work

Show 1 Share
10 |10000 characters needed characters left characters exceeded

If CONVERSION_EXIT_ALPHA_INPUT does it, then it is more convenient to use a string template with formatting option alpha, or?

1
Horst Keller
Aug 22, 2017 at 04:39 PM
0

Debug? Check involved data objects, their types and corresponding rules?

Share
10 |10000 characters needed characters left characters exceeded