Application Development and Automation 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: 
Read only

Conversion Exit for the DataElement VBELN_VF

ullas_u2
Explorer
0 Likes
4,197

Dear All,

I faced one problem that:-

When I tried to execute my 'Z' table (which is having a field VBELN which carries the dataelement VBELN_VF) after giving the value(100000005; this value is already there in the table for the field) in the selection-screen, Im getting the message 'No Data Exists' (althoug the record exists).

On checking the domain, I found that there is a Conversion Exit. But when I provided this value (100000005) as an input in the exit function module, the same value is getting as output from the function Module.

But when I tried the same scenario with another value which is having 1 more digit (1100000005), the output is getting correctly in SE11.

In the 1st scenario, i tried by adding '0' as prefix. 'No Data' was the output.

Can you suggest the reason / solution without changing the DataElement?

Regards

Ullas

Edited by: UllasU on Mar 31, 2010 9:43 AM

4 REPLIES 4
Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,289

This data element VBELN_VF is related to domain VBELN which has conversion exit ALPHA.

So basically you have to use CONVERSION_EXIT_ALPHA_INPUT to convert from input(external) to internal(database) and CONVERSION_EXIT_ALPHA_OUTPUT or WRITE to reverse the operation. Hopefully, this should be implicit if each and every screen/dynpro use the ddic reference.

But you must do that in EACH AND EVERY PROGRAM that reads or writes in your z-table.

Perform some browse via SE16N desactivating conversion exit, to check if there are correct data in the database table. Remember that you can programmaticaly put any 10 character strings in the database, there is no check....

Regards,

Raymond

Read only

0 Likes
2,289

Hi Raymond,

I tried with the Conversion Exit Function Modules; but it gave me the same value as output(gave input as 100000005 and got output as 100000005). So I dont think its a problem related to ConversionExit.

-Ullas

Read only

0 Likes
2,289

Write a report to check your database table values like

TABLES: *ztable,
        ztable.

DATA: errors TYPE i,
      corrects TYPE i.

SELECT * FROM ztable.
  CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
       EXPORTING
            input  = ztable-vbeln
       IMPORTING
            output = *ztable-vbeln.
  IF ztable-vbeln NE *ztable-vbeln.
    ADD 1 TO errors. 
  ELSE.
    ADD 1 TO corrects.
  ENDIF.
ENDSELECT.

WRITE: / errors, ' defective records'.
WRITE: / corrects, ' correct records'.

(In case of doubts, check the report replacing ZTABLE by VBAK or VBRK, you will get 0 defective records.)

NB: CONVERSION_EXIT_ALPHA_INPUT converts 100000005 to 0100000005 on every SAP system i know if the parameters are defined with VBELN_VF (10 characters).

Regards,

Raymond

Read only

0 Likes
2,289

Hi raymond.

Thanks for the support.

The issue has been traced out. The problem was bit different.

The data posting to the table happened via GUI_UPLOAD function module. I kept the data type of the field in excell as 'GENERAL' and done the uploading. On changing the data type to 'TEXT' and done the upload, i found the issue got solved.

-Ullas