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 SEL_DATE filed Single - Character Flag

Former Member
0 Kudos

Dear gurus

i created a lsmw for T/code VK12 . I faced problem when the LSMW read till convert data.

In the VK12 , this Screen Field SEL_DATE will be my valid on date. I created the source filed Valid on date to match the mapping with SEL_DATE.

Here are my example of data:

SEL_DATE : 12022009

VALID_ON : 12022009 ( read from my text file)

the recording , mappings and source fields are created perfectly. Even read data display , the record able to shows out accordingly. But when comes to convert data , SEL_DATE return to me 1 Field Length.

Now i feel so puzzled, why this happen?

After some checking find out that this particular field SEL_DATE is a "SINGLE-CHARACTER FLAG"

expert out there, do you have any suggestions or guidance? i really need this field as to identify my record.

Without valid on date i can't call out the specific record and update it using LSMW

thanks

Wilson Low

13 REPLIES 13

Former Member
0 Kudos

I suppose error is in SEL_DATE type declaration . How u hve done it ??

Keep it same as valid on in VK12 tcode ( IE RV130-DATAB )

0 Kudos

hi Anil

when u run recording , you will be able to see SEL_DATE

0 Kudos

Hi Wilson,

u hve defined sel_date in lsmw to map valid on date in vk12 tcode ,,rite ???

if yes , plz define sel_date with same data type of valid on date ...

0 Kudos

Hi Anil

SEL_DATE was not defined by me. Once i create the recording , in the display recording view ,

SEL_DATE appear because when the time i do recording this particular field was capture , it was under RV13A005 1000

By the way anil , is it in the recording edit i can change the data type? mind to guide me?

HI all,

I recently have the same problem. With the help of other forum post, I was able to solve this problem in this way:

1. Export the lsmw project (Extras->Export Projects) to a file.

2. Edit the exported file and search for SEL_DATE field. Edit the last column in the right and change:

000001000002000001CHARC to 000001000002000010CHARC

3. Import the project using the modified file (Extras->Import Projects).

Problem solved.

Cheers.

0 Kudos

Thanks for this elegant solution, Edward.

0 Kudos

This is a brilliant solution. Thanks!!

0 Kudos

Perfect, thanks a lot

0 Kudos

Thaks so much! 🙂

0 Kudos

Excelente solution!; but be aware to make the change in several parts where the field SEL_DATE is refered, in my case 3 or 4 diferent  lines.

Former Member
0 Kudos

which method your using?

0 Kudos

I created a LSWM , with BATCH INPUT RECORDING

koenvanlangeraert
Discoverer

it seems to be a more general issue with the field DATAM

note https://launchpad.support.sap.com/#/notes/2523384 indicates another workaround :

Symptom

You cannot go ahead with creating LSMW because of the following:

1.Recording transaction MEK2, field DATAM (initial date) records just one character, therefore batch input ends in error.

2. When using LSMW to change price conditions with VK12 transaction, the target field Selection table for date (SEL-DATE) is mapped as CHAR1.

length 1.

Resolution

Please check your project and field SEL_DATE in table /SAPDMC/LSGBDC by using transaction SE16 and change the length specification manually:

PROJECT 'your project'
RECORDING 'your recording'
LINENR ******

PROGRAMM
DYNPRO 0
DYNBEGIN
FNAM SEL_DATE
PARNAME DATAM

LENG 1 << change to 8
INTLEN 1 << change to 8
OUTPUTLEN 1 << change to 10
DATATYPE CHAR
INTTYPE C
LOWERCASE


About how to change the table content:

  1. SE11 -> Display the table -> "Delivery and maintenance" tab
  2. change "Data Browser/Table View Maint." setting to "Display/maintenance allowed"
  3. activate the setting.
  4. Then, you should see "change" button in SE16 and you can do the corresponding changes mentioned above.

Kr;

Koen