‎2008 Jul 31 11:18 AM
Hello All,
This is my requirement. I am uploading data to database through LSMW using Batch Input method for FB01 transaction.
For 1 item it is working correctly. If i keep multiple items and upload i am getting message as No batch input data for screen SAPMF05A 0700.
Is it possible to upload the general ledger data to database using this Batch Input.
Can you please help me out in this issue.I will reward you with points.
Thanks,
Indrakaran
‎2008 Jul 31 11:24 AM
Ir,
exactly i face this issue once but i handle this by BDC table control.
but if you want to go only with LSMW than you can write some code in LSMW.
for LSMW code.
In second screen of LSMW>Shift+F5>select both check box against Generate Conversion Program
Display Conversion Program here you can write your own code in Display Conversion Program by changing it in change mode.below am providing you some test code for table control in LSMW:
data: CONSNUMBER type adrt-CONSNUMBER.
break gujargouda.
TABLES: kna1,adrc,adrt.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = SOURCE-KUNNR
IMPORTING
OUTPUT = SOURCE-KUNNR.
SELECT single * from kna1 WHERE kunnr = SOURCE-KUNNR.
SELECT single * from adrc where ADDRNUMBER = kna1-adrnr.
SELECT single CONSNUMBER from adrt into (CONSNUMBER) where ADDRNUMBER = adrc-ADDRNUMBER
and ( remark like 'p%' or remark like 'P%' or remark = ' ' ) .
if CONSNUMBER = '1'.
perform ur_SMTP_ADDR_01
using SOURCE-EMAIL
changing XK02-SMTP_ADDR_01.
else.
perform ur_SMTP_ADDR_02
using SOURCE-EMAIL
changing XK02-SMTP_ADDR_02.
endif.
* --- XK02-REMARK_01
if CONSNUMBER = '1'.
XK02-REMARK_01 = SOURCE-NOTE.
ELSE.
XK02-REMARK_02 = SOURCE-NOTE.
ENDIF.
* --- __END_OF_RECORD__
transfer_record.
g_skip_record = no.
endform. "convert_0001
‎2008 Jul 31 11:24 AM
Ir,
exactly i face this issue once but i handle this by BDC table control.
but if you want to go only with LSMW than you can write some code in LSMW.
for LSMW code.
In second screen of LSMW>Shift+F5>select both check box against Generate Conversion Program
Display Conversion Program here you can write your own code in Display Conversion Program by changing it in change mode.below am providing you some test code for table control in LSMW:
data: CONSNUMBER type adrt-CONSNUMBER.
break gujargouda.
TABLES: kna1,adrc,adrt.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = SOURCE-KUNNR
IMPORTING
OUTPUT = SOURCE-KUNNR.
SELECT single * from kna1 WHERE kunnr = SOURCE-KUNNR.
SELECT single * from adrc where ADDRNUMBER = kna1-adrnr.
SELECT single CONSNUMBER from adrt into (CONSNUMBER) where ADDRNUMBER = adrc-ADDRNUMBER
and ( remark like 'p%' or remark like 'P%' or remark = ' ' ) .
if CONSNUMBER = '1'.
perform ur_SMTP_ADDR_01
using SOURCE-EMAIL
changing XK02-SMTP_ADDR_01.
else.
perform ur_SMTP_ADDR_02
using SOURCE-EMAIL
changing XK02-SMTP_ADDR_02.
endif.
* --- XK02-REMARK_01
if CONSNUMBER = '1'.
XK02-REMARK_01 = SOURCE-NOTE.
ELSE.
XK02-REMARK_02 = SOURCE-NOTE.
ENDIF.
* --- __END_OF_RECORD__
transfer_record.
g_skip_record = no.
endform. "convert_0001
‎2008 Jul 31 11:37 AM
Hello Amit,
Can you please tell me where to write the code in LSMW of which stage. When 1st record is poulated into the screen by foreground process in session. It is not taking the 2nd record. It is giving the message as mentioned before.
Thnaks,
Indrakaran.