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: 

LSMW Field length for a custom field restricted to 30 Chars

Former Member
0 Kudos

Dear LSMW experts,

  I have created a custom transaction/program which accepts  two inputs - Material Number and Material description and updates Description.

The program uses Parameters : P_MATNR like mara-matnr  and P_MAKTX like makt-maktx.

The program runs fine and fields lengths are inherited from the data dictionary.

Now I did a Recording in LSMW. In that recording the fields P_MATNR and P_MAKTX appear.

I have done 'default all'. then provided a name and Description to the two parameters. So far no issues.

When I hit save - it says the P_MATNR would be set to a length of 30  and P_MAKTX will be set to a field length of 30.

MAKT-MAKTX is 40 Char long. So when the conversion runs, it only maps 30 Chars of Source to the Target.

Tried some debugging. The program tries to determine the data element using the Field name  - in this case P_MAKTX. does not find an entry.

Hence it gives the information message that field length would be set to 30.

This problem does not appear when we use BDC-recording for MM02. With MM02 recording it shows MAKT-MAKTX as the field and determines the right length of 40.

Have you encountered this problem when BDC recording is done for Custom Transactions using parameters with a field length more than 30 ?

Can you suggest a solution ?

Thanks

2 REPLIES 2

Former Member
0 Kudos

In case it helps any one:

I traced the issue to a SAP Note. When our system was in 4.0B, we were asked to apply a note. That note commented out some code. That is causing this issue. So many users will not face this issue.

Thanks

Siva K

bernhard_bhnert
Explorer
0 Kudos

In case somebody still needs a solution for this:

I didn't find the place, where the field length of the recorded customer field ist set, but set to 30 it is. What I found is the table, in which the information is stored. Simply go to table /SAPDMC/LSGBDC and edit the record in question (instuctions for editing an entry in se16 are aplenty on the web). Afterwards make sure, you re-assign the source field.

These changes can be made in your dev system and will be exported to prod if you chose so.

Best wishes to all

Bernhard