2008 Oct 27 4:34 AM
Hi,
Iam calling a BAPI for goods movement. For this iam passing my material number from a flat file. The BAPI only recognizing the material when it is in capitals, if the material number is in small letters it is not recognizing that material and displays a message like material doesn't exist. Do i have to convert the materials to caps before passing them to the BAPI. or is there any FM which converts the material into internal format.
Regards,
Anil.
Hi,
Iam calling a BAPI for goods movement. For this iam passing my material number from a flat file. The BAPI only recognizing the material when it is in capitals, if the material number is in small letters it is not recognizing that material and displays a message like material doesn't exist. Do i have to convert the materials to caps before passing them to the BAPI. or is there any FM which converts the material into internal format.
Regards,
Anil.
2008 Oct 27 4:39 AM
2008 Oct 27 5:24 AM
Hi,
When i tested this FM its working fine. But in my program it is not working. Am still not able to convert it.
Regards,
Anil.
2008 Oct 27 5:28 AM
Hi
I hope this is how you are giving it.
ma = 'zapret'.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
INPUT = ma
IMPORTING
OUTPUT = ma1
* EXCEPTIONS
* LENGTH_ERROR = 1
* OTHERS = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write: / ma1.Regards,
Vishwa.
Edited by: Vishwa Sri Hari on Oct 27, 2008 10:58 AM
2008 Oct 27 5:33 AM
Hi viswa,
I am giving exactly as you mentioned. But in my case the output ma1 contains the same text which i passed with ma...
Regards,
Anil.
2008 Oct 27 5:36 AM
Hi Anil,
Have you tried using the code
TRANSLATE <fieldname> to UPPER CASE.
And then pass your fieldname to the BAPI.
I think this should work.
Cheers,
Vishnu
2008 Oct 27 5:36 AM
Oh ok. It is not getting converted to Capitals??. OK then
ma = 'zapret'.
TRANSLATE ma TO UPPER CASE.Try this...It should work.
Regards,
Vishwa.
2008 Oct 27 5:45 AM
what is the source , you are getting the material number. are you getting it from any flat file. or any database table.
2008 Oct 27 5:51 AM
Hi Vijay,
Iam getting the material from flat file. and needs to pass this to the BAPI in the corresponding item table.
In program when iam using the specified FM its not getting transalated automatically. But when i tested, it is working fine.
Regards,
Anil Reddy.
2008 Oct 27 5:54 AM
2008 Oct 27 5:59 AM
Hi Viswa,
Using translate it is woking fine.
But i wonder why the FM is not working in the program.
Regards,
Anil.
2008 Oct 27 6:06 AM
Hi
Try with this FM otherwise:
po = 'zapret'.
CALL FUNCTION '2054_TRANSLATE_2_UPPERCASE'
EXPORTING
I_STRING = po
IMPORTING
E_STRING = po1.
* EXCEPTIONS
* ERROR_OCCURED = 1
* OTHERS = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write: / po1.Regards,
Vishwa.
2008 Oct 27 4:40 AM
use the conversion routine function CONVERSION_EXIT_MATN1_INPUT to convert the material ,before passing it to BAPI parameters.
2008 Oct 27 4:40 AM
Hi
Its true that you have to convert the material number into capitals...because it is case sensitive, and if you check in the master table it is stored in caps.
You can use the Key Translate to upper case....
Regards,
Vishwa.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |