Skip to Content
avatar image
-1
Former Member

Error getting Customer Details

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

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

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 22, 2017 at 04:39 PM

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

    Add comment
    10|10000 characters needed characters exceeded