Call transaction in Direct input method
Hi All
how do i use call transaction in direct input method.
thanks all
Hi,
Direct input is different and Call transaction is different.
In Direct input method,the data will be uploaded directly into the table.
In call transaction you can change the data before uploading into dictionary table by using tcode
Ex for Direct input method
TABLES: kna1.
DATA: BEGIN OF itab1 OCCURS 0,
str(255),
END OF itab1.
DATA: itab2 TYPE kna1 OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = 'D:\ABAP EVE\ffile1.txt'
filetype = 'ASC'
TABLES
data_tab = itab1
EXCEPTIONS
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
no_authority = 10
OTHERS = 11.
IF sy-subrc <> 0.
WRITE:/ 'sorry'.
ELSE.
LOOP AT itab1.
SPLIT itab1-str AT ',' INTO itab2-kunnr itab2-name1.
APPEND itab2.
ENDLOOP.
IF sy-subrc = 0.
LOOP AT itab2.
WRITE:/ itab2-kunnr,itab2-name1.
INSERT INTO kna1 VALUES itab2.
ENDLOOP.
IF sy-subrc = 0.
WRITE:/ 'inserted'.
ELSE.
WRITE:/ 'not inserted'.
ENDIF.
ELSE.
WRITE:/ 'fail'.
ENDIF.
ENDIF.
Flat file:
10001,Sadney
10003,Yogesh
20005,Madan
Ex for Call transaction
DATA: BEGIN OF itab OCCURS 0,
str(255),
END OF itab.
DATA: BEGIN OF itab1 OCCURS 0,
lifnr LIKE lfa1-lifnr,
name1 LIKE lfa1-name1,
ort01 LIKE lfa1-ort01,
END OF itab1.
DATA: jtab LIKE bdcdata OCCURS 0 WITH HEADER LINE.
DATA: ktab TYPE TABLE OF bdcmsgcoll,
wa TYPE bdcmsgcoll.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = 'D:\ABAP EVE\ffile4.txt'
filetype = 'ASC'
TABLES
data_tab = itab
EXCEPTIONS
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
no_authority = 10
OTHERS = 11.
IF sy-subrc <> 0.
WRITE:/ 'no file exist'.
ENDIF.
LOOP AT itab.
SPLIT itab-str AT ',' INTO itab1-lifnr itab1-name1 itab1-ort01.
APPEND itab1.
ENDLOOP.
LOOP AT itab1.
PERFORM prginfo USING 'SAPMZBDCCT' '123'.
PERFORM fldinfo USING 'i01' itab1-lifnr.
PERFORM fldinfo USING 'i02' itab1-name1.
PERFORM fldinfo USING 'i03' itab1-ort01.
CALL TRANSACTION 'ZCSBDCCT' USING jtab
MODE 'N'
MESSAGES INTO ktab.
ENDLOOP.
--- Display the Status messages ---
LOOP AT ktab INTO wa WHERE msgtyp = 'E'.
WRITE:/ wa.
ENDLOOP.
*& Form prginfo
text
-->PRGNAME text
-->SCRNUMBER text
FORM prginfo USING prgname scrnumber.
CLEAR jtab.
REFRESH jtab.
jtab-program = prgname.
jtab-dynpro = scrnumber.
jtab-dynbegin = 'X'.
APPEND jtab.
ENDFORM. "prginfo
*& Form fldinfo
text
-->FLDNM text
-->FLDVAL text
FORM fldinfo USING fldnm fldval.
CLEAR jtab.
jtab-fnam = fldnm.
jtab-fval = fldval.
APPEND jtab.
ENDFORM. "fldinfo
MPP CODE.
TOP-INCLUDE.
DATA: OK_CODE TYPE SY-UCOMM.
DATA: I01(10),I02(20),I03(26).
DATA: WA TYPE LFA1.
PAI
CASE OK_CODE.
WHEN 'INSERT'.
MOVE I01 TO WA-LIFNR.
MOVE I02 TO WA-NAME1.
MOVE I03 TO WA-ORT01.
INSERT INTO LFA1 VALUES WA.
IF SY-SUBRC = 0.
MESSAGE I001(ZCSMSG).
ELSE.
MESSAGE I002(ZCSMSG).
ENDIF.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
Reward,if useful.
Thanks,
Chandu
Similar Messages
-
Hi experts,
Can you please provide documentation on Direct input method or any link which gives me overall idea.
Yakub.Direct Input method is used for bulk transfer of data into SAP system.It results in faster execution since no screens are processed and the SAP database will be updated directly using the standard function modules.
Better example where direct input method will be used is... uploading the data for material master.....it includes lot of views so its very much difficult to capture all the views and record the tcode and map the data in such conditions its better to go with DI methods
Advantages:
in session method or Call Transaction method while uploading the data u do the validation by fallowing the screen sequence and field sequence where as in Direct Input validations can be done set of code so this make the process very fast so its advantageous to upload large amout of data.
you always use the standard sap provided program for this.
Here in Direct Input method very important thing is structure of flat file... so to know the structure first of all you have to download the data for one record into the internal table with the use of the same program then with the use of that structure u have to desing the flat file and upload the data. -
Can anybody tell me why "Direct Input Method of BDC" said to be Obselete?
Why it is said that "Direct Input Method of BDC" is obselete?
hi,
Direct Input:
A recent technique to input data safely. An alternative to batch input.
With direct input, the SAP function modules execute the consistency checks. However with batch input, these consistency checks are executed with help of the screens. This means that direct input has considerable performance advantages. But there are a few programs for direct input, you can use them if it accomplishes your goal. Direct Input programs work like that they update database tables directly. As you know that it is forbidden to update SAP database tables directly, since consistency and security should be considered. Exceptions are these direct input programs. So you are not able to write custom ABAP direct input programs. But of course you can write ABAP programs to update custom database tables (Z tables), if you are sure all about consistency.
SAP has created direct input programs because SAP wanted to enhance the batch input procedure, since batch input is slower. SAP offers the direct input technique, especially for transferring large amount of data. In contrast to batch input, this technique does not create sessions, but stores, updates, inserts data directly. To enter the data into the corresponding database tables directly, the system calls a number of function modules that execute any necessary checks. In case of errors, the direct input technique provides a restart mechanism. However, to able to activate the restart mechanism, direct input programs must be executed in the background only. To maintain and start these programs, use program RBMVSHOW or transaction BMV0.
Examples for direct input programs are:
RFBIBL00 - FI
RMDATIND - MM
RVAFSS00 - SD
RAALTD11 - AM
RKEVEXTO - CO-PA
I hope it helps.
In contrast to batch input, this technique does not create sessions, but stores the data directly. It does not simulate the online transaction. To enter the data into the corresponding database tables directly, the system calls a number of function modules that execute any necessary checks. In case of errors, the direct input technique provides a restart mechanism. However, to be able to activate the restart mechanism, direct input programs must be executed in the background only. Direct input checks the data thoroughly and then updates the database directly.
cheers!'sri -
LSMW Direct input method error
Hi experts,
I created the LSMW using direct input method (PR Creation).
In the create batch input session step (executed) i am getting below
message and follwed bt processing terminated message and going out
Transaction 0: transaction code / not supported
what could be the problem ? any problem in specifying logical path .
pls let me know the solution.
Thanks
saiHi chenna,
Thanks for reply, I added the tcode and now getting the message like the session was created
but when i see in sm35 there is no seesion created and there is no log also.
what could be the reason? pls explain
thanks
sai -
Special character "/" replacing with blank with Direct Input Method posting
Hi All,
I am posting FI historical data using Direct Input Method. Payment term contains special character "/"( I/E). SAP standard program replacing Special character "/" with blank (I E) so document posting is failing. Could you please advise.
Thanks
Chandra.Can You please specify the Transaction code and SAP program name for direct input.
-
LSMW Direct Input Method - Change Documents
Hello experts,
Could anyone please tell me how to enable the change documents(not just runtime) for LSMW direct Input method? There is also one option "Change Documents" in the last step of the process, will this write into any table that I see the changes later If I run the last step with selected this option? If yes, What are the application (customer master data, vendor master data, material master data, etc) specific tables?
Is there anyway that I could populate this method changes into the CDHDR & CHPOS tables?
SAP documenation on this:
To enter the data into the *corresponding database tables directly*, the system calls a number of function modules that execute any necessary checks. In case of errors, the direct input technique provides a restart mechanism
http://help.sap.com/erp2005_ehp_04/helpdata/EN/fa/097174543b11d1898e0000e8322d00/content.htm
Since this tool writing data into database tables directly skips the CDHDR & CDPOS recording..
Is there any other possible way for the complete change logs (change pointers???)? ( Or only table logging?)
Please share your experience on this.
Thanks,
HimadamaNo response received..
-
Lsmw direct input method for mm01
Hi...!!!!
What are the fields required for FERT material in Direct input method..
And also what are the views to be select for FERT material....hi soumya..!!!!
i find ur link it work only for ur data..
then when i try for my data.... it show tax error msg..
the error msg shown below..
transaction: 0000000001 Matl no.: 7FDUMMY001
E MG 172: You have not fully maintained the tax classifications
transaction: 0000000002 Matl no.: 7FDUMMY002
E MG 172: You have not fully maintained the tax classifications
transaction: 0000000003 Matl no.: 7FDUMMY003
E MG 172: You have not fully maintained the tax classifications
transaction: 0000000004 Matl no.: 7FDUMMY004
E MG 172: You have not fully maintained the tax classifications
transaction: 0000000005 Matl no.: 7FDUMMY005
E MG 172: You have not fully maintained the tax classifications -
Lsmw direct input method for ct04
Hello Friends,
Im using lsmw direct input method RCCTBI01 obj 0150 method 000 for creating characteristics value.
In lsmw im getting erro at "specify file" stage as "no logical path has been specified. I have come to conclusion tht i have to define some logical path in FILE transaction code but im not clear what needs to be done .
Pls let me know how to define logical file path for ct04 transaction.
Regards,
SunnyHi,
First choose or create a directory by selecting say TMP as the logical file path and then click the assignment of physical paths to logical paths.Double click your operating system eg. UNIX then specify the directory followed by a generic filename e.g. /tmp/<FILENAME>
Now click logical file name definition and create a new name, say ZCT04_FILE give the logical path as TMP and then specify the file name e.g. CT04.TXT and the format ASC.
The file will then be created as /tmp/CT04.TXT
Regards,
Darren -
Upload sales text for material master using LSMW direct input method
Hello Experts,
I was trying to upload sales text for a material master using LSMW direct input method.
I followed the following steps for the same
Tab dlimited Text file format
MATNR LONGTEXT LINE
MATERIAL1 LONGTEXT FOR MATERIAL MATERIAL1 1
Step1 -> Maintain object attributes
Object -> 0001
Method-> 0001
Program name -> /SAPDMC/SAP_LSMW_IMPORT_TEXTS
Program type -> D
Step2 -> Maintain Source Structure
Source structure -> LONG_TEXT Source structure for long text
Step 3-> Maintain souce file
Source Fields
ZLONG_TEXT Source structure for long text
MATNR C(018) MATNR
LTEXT C(132) LTEXT
Step 4-> Maintain structure relationship
Structure Relations
/SAPDMC/LTXTH Long Texts: Header <<<< ZLONG_TEXT Source structure for long text
Select Target Structure /SAPDMC/LTXTH .
/SAPDMC/LTXTL Long Texts: Row <<<< ZLONG_TEXT Source structure for long text
Select Target Structure /SAPDMC/LTXTL .
Step 5-> Maintain Field mapping and conversion rules
Here i have assigned constan rules to couple of them like
/SAPDMC/LTXTH Long Texts: Header
Fields
OBJECT Texts: Application Object
Rule : Constant
Code: /SAPDMC/LTXTH-OBJECT = 'MVKE'.
NAME Name
Source: ZLONG_TEXT-MATNR (MATNR)
Rule : Transfer (MOVE)
Code: /SAPDMC/LTXTH-NAME = ZLONG_TEXT-MATNR.
ID Text ID
Rule : Constant
Code: /SAPDMC/LTXTH-ID = '0001'.
SPRAS Language Key
Rule : Constant
Code: /SAPDMC/LTXTH-SPRAS = 'E'.
/SAPDMC/LTXTL Long Texts: Row
Fields
TEXTFORMAT Tag column
Rule : Constant
Code: /SAPDMC/LTXTL-TEXTFORMAT = '/'.
TEXTLINE Text Line
Source: ZLONG_TEXT-LTEXT (LTEXT)
Rule : Transfer (MOVE)
Code: /SAPDMC/LTXTL-TEXTLINE = ZLONG_TEXT-LTEXT.
Step6 -> Specify file
Legacy Data On the PC (Frontend)
Data D:\Sales_Longtext.txt
Step7 -> Assign File
ZLONG_TEXT Source structure for long text
Data D:\Sales_Longtext.txt
Step8 -> Read data
Output result
Source Structure Read Written Not Written
ZLONG_TEXT 1 1 0
Transactions Read: 1
Records Read: 1
Transactions Written: 1
Records Written: 1
Step 8 -> Display read data
Field Name Field Text Field Value
MATNR MATNR MATERIA1
LTEXT LTEXT SALES TEXT FOR Material MATERIAL1
Step 9 -> Convert data
File Read: ZNRD_PRJ1_ZNRD_SUBPRJ2_ZNRD_LTEXT.lsmw.read
File Written: ZNRD_PRJ1_ZNRD_SUBPRJ2_ZNRD_LTEXT.lsmw.conv
Transactions Read: 1
Records Read: 1
Transactions Written: 1
Records Written: 2
Step 10 -> Display converted data
1 /SAPDMC/LTXTH 1MVKE MATERIAL1 0001E
2 /SAPDMC/LTXTL 2/ SALES TEXT FOR Material MATERIAL1
Step 11 -> Start direct input program
Output result for the same
Legacy System Migration Workbench
Project: ZNRD_PRJ1 ORH
Subproject: ZNRD_SUBPRJ2 Upload long text
Object: ZNRD_LTEXT Long text tru direct input
File : ZNRD_PRJ1_ZNRD_SUBPRJ2_ZNRD_LTEXT.lsmw.conv
Long Texts in Total: 1
Successfully Transferred Long Texts: 1
Non-Transferred Long Texts: 0
Now when i check the material master sales view -> sales text it is empty.
Please help me with the same.
Regards,
Ranjith NHello Experts, I was trying to upload sales text for a material master using LSMW direct input method.
I followed the following steps for the same
Tab dlimited Text file format
MATNR LONGTEXT LINE
MATERIAL1 LONGTEXT FOR MATERIAL MATERIAL1 1 *************************************************************************************************************
Step1 -> Maintain object attributes
Object -> 0001
Method-> 0001
Program name -> /SAPDMC/SAP_LSMW_IMPORT_TEXTS
Program type -> D
Step2 -> Maintain Source Structure
Source structure -> LONG_TEXT Source structure for long text
Step 3-> Maintain souce file Source Fields
ZLONG_TEXT Source structure for long text
MATNR C(018) MATNR
LTEXT C(132) LTEXT
Step 4-> Maintain structure relationship
Structure Relations
/SAPDMC/LTXTH Long Texts: Header <<<< ZLONG_TEXT Source structure for long text
Select Target Structure
/SAPDMC/LTXTH . /SAPDMC/LTXTL Long Texts: Row <<<< ZLONG_TEXT Source structure for long text
Select Target Structure /SAPDMC/LTXTL .
Step 5-> Maintain Field mapping and conversion rules
Here i have assigned constan rules to couple of them like
/SAPDMC/LTXTH Long Texts: Header
Fields
OBJECT Texts: Application Object
Rule : Constant
Code: /SAPDMC/LTXTH-OBJECT = 'MVKE'.
NAME Name
Source: ZLONG_TEXT-MATNR (MATNR)
Rule : Transfer (MOVE)
Code: /SAPDMC/LTXTH-NAME = ZLONG_TEXT-MATNR.
ID Text ID
Rule : Constant
Code: /SAPDMC/LTXTH-ID = '0001'.
SPRAS Language Key
Rule : Constant
Code: /SAPDMC/LTXTH-SPRAS = 'E'.
/SAPDMC/LTXTL Long Texts: Row
Fields
TEXTFORMAT Tag column
Rule : Constant
Code: /SAPDMC/LTXTL-TEXTFORMAT = '/'.
TEXTLINE Text Line
Source: ZLONG_TEXT-LTEXT (LTEXT)
Rule : Transfer (MOVE)
Code: /SAPDMC/LTXTL-TEXTLINE = ZLONG_TEXT-LTEXT.
Step6 -> Specify file Legacy
Data On the PC (Frontend)
Data D:\Sales_Longtext.txt
Step7 -> Assign File ZLONG_TEXT
Source structure for long text
Data D:\Sales_Longtext.txt
Step8 -> Read data
Output result
Source Structure Read Written Not Written
ZLONG_TEXT 1 1 0
Transactions Read 1
Records Read: 1
Transactions Written: 1
Records Written: 1
Step 8 -> Display read data
Field Name Field Text Field Value
MATNR MATNR MATERIA1
LTEXT LTEXT SALES TEXT FOR Material MATERIAL1
Step 9 -> Convert data
File Read: ZNRD_PRJ1_ZNRD_SUBPRJ2_ZNRD_LTEXT.lsmw.read
File Written: ZNRD_PRJ1_ZNRD_SUBPRJ2_ZNRD_LTEXT.lsmw.conv
Transactions Read: 1
Records Read: 1
Transactions Written: 1
Records Written: 2
tep 10 -> Display converted data
1 /SAPDMC/LTXTH 1 MVKE MATERIAL1 0001 E
2 /SAPDMC/LTXTL 2/ SALES TEXT FOR Material MATERIAL1
Step 11 -> Start direct input program
Output result for the same
Legacy System Migration Workbench Project:
ZNRD_PRJ1 ORH
Subproject: ZNRD_SUBPRJ2 Upload long text
Object: ZNRD_LTEXT Long text tru direct input
File : ZNRD_PRJ1_ZNRD_SUBPRJ2_ZNRD_LTEXT.lsmw.conv
Long Texts in Total: 1
Successfully Transferred Long Texts: 1
Non-Transferred Long Texts: 0
Now when i check the material master sales view -> sales text it is empty. Please help me with the same.
Regards,
Ranjith N -
Using Direct input method(LSMW)Can I upload only 3 fields for MM01
Using Direct input method(LSMW)Can I upload only Matnr,mbrsh,mtart fields for MM01.Otherwise I have to give all the mandatory fields.?
Hello TJK,
LSMW will work in the same way as you create normal material master with the transactions, here you are giving the value through flat file and creating material master with program.
You can create only one view with LSMW but you need to give all mandatory field on that particular view, so if you have only these three field as mandatory then yes it is possible, if you have any more field mandatory addition to these fields then it will not work out, during the last step it will throw error saying "maintain the value for field XXX"
Hope this helps.
Regards
Arif Mansuri -
Hi
What is the procedure to include a specific program / report in the drop down box of program name of Direct Input method in LSMW?
What is the diff. between Physical path and Logical path?
How can we give our input data using logical path when we execute some standard batch or direct input programs?
Ex. RMDATIND.http://help.sap.com/saphelp_erp2005vp/helpdata/en/87/f3ae63e68111d1b3ff006094b944c8/frameset.htm
Regards,
Amit -
LSMW updating problem with direct input method
Hi!
Using version 4.0.0 of the LSM Workbench from 2001-07-01 on SAP R/3 4.7, I need to update the purchase order text and wanted to use the direct input method. I found a tutorial on SAPTechnical which I followed. All went well, the input data was converted and at last I got the message:
"Long Texts in Total : 2
Successfully Transferred Long Texts : 2
Non-Transferred Long Texts : 0"
My trials are recorded in table STXH with date and time and also in the material master change history. However, the result in the material master is that the purchase order text is NOT updated.
Can anyone tell me why this might be?Hi Santosh!
First of all, thank you very much for posting an answer. But unfortunately it was of no help. I want to update the purchase order text on a material that already has the purchasing and purchase order text views. When I compare the PO text before and after my "Successfuly Transferred Long Texts" there is no change. I hope that this make it more clear but it is still a mystery to me. -
Doubt in BDC direct input method
Hi experts
I dont know how to upload data in SAP data base by using BDC direct input coding method. Can u people explain this with coding?
Thanks in advance.
Regards
AntonyHi,
DI is used when u r going upload large amount of data for single application.
Better example where direct input method will be used is... uploading the data for material master.....it includes lot of views so its very much difficult to capture all the views and record the tcode and map the data in such conditions its better to go with DI methods
advantages:
in session method or CT method while uploading the data u do the validation by fallowing the screen sequence and field sequence where as in DI validations can be done set of code so this make the process very fast so its advantageous to upload large amout of data.
you always use the standard sap provided program for this.
Here in DI method very important thing is structure of flat file... so to know the structure first of all you have to download the data for one record into the internal table with the use of the same program then with the use of that structure u have to desing the flat file and upload the data.
Re: re: direct input method
Award points if useful.
Thanks,
Ravee... -
Hi all,
Plz give me brief note on direct input method, what is the use..
AND
Why do we translate the scripts?
Thanks in advance
Venkathi,
direct input method is used for bulk transfer of data into SAP system.It results in faster execution since no screens are processed and the SAP database will be updated directly using the standard function modules.
Translation is used for translating the texts into the required languages.There is no other specific purpose exists.
<b>Do remember to close all your threads as you have opened multiple threads today..</b>
Cheers,
Abdul Hakim -
Error Log in Direct Input Method of LSMW
Hello!
We are developing an upload through LSMW using its direct input method for material master. This method is better than the Recording method but the only problem we are having is maintaining the error log. Unlike the recording method, in direct input the system gives an error log but it cant me maintained in a permanent file i.e when we go back to the upload for specifying a new file, the error log of the previous file is gone.
Is there any way that we can maintain the error log in a permanent file? Help needed ASAP!
Thank You!
Regards
SaharWhen i enter %PC in the command field the system gives following information
Function code cannot be selected
Message no. 00255
Diagnosis
You entered an inactive function code.
You can trigger this by:
o inputting directly in the OK code field,
o inputting the fastpath of an inactive menu function,
o choosing an inactive function key, or even by
o choosing ENTER, if ENTER has an inactive function.
In batch input, a function code is included in field BDC_OKCODE of the
session, if this function code is not assigned to ENTER.
Maybe you are looking for
-
my new project is to create a flash site for an resturant. the have an html site, that they don't want to chage. I am aloud to create a new home page that allows the user to choose between the two, or create a new html . I have complete control over
-
When I try and open Microsoft Word 2011 documents on my IMAC they start opening one after another at a rapid speed and I can't stop it. I reboot and same thing happens. The documents open in rapid succession on their own and don't stop until I force
-
How do I get Vista to go back to the Windows' Vista generic driver after an Extigy upgrade fiasco
Hello all. First, I'm glad to have the opportunity to be a part of this group. I didn't know it even existed, but here I am...so, let me know what you think. I am a new Windows Vista Ultimate OS owner, and thus far, I'm absolutely thrilled with the a
-
SQLServer to oracle migration. Issue with table having image data.
Hi, I am using the SQL Developer version 1.5.0.53 Build MAIN-53.38. I am trying to migrate from sql server database to oracle. Sql server database version is 2005 and oracle database version is 10g (10.1.0.2 and 10.2.0.3). Both Oracle and Sql server
-
Whats wrong with my trigger?
my trigger begin select seq.nextval into partner_id from dual; end; my sequence create sequence seq start with 1 increment by 1 nomaxvalue; the error ORA-04098: trigger 'ATT_CON.TRI_INCREMENT_PARTNER' is invalid and failed re-validation could anyone