FM for sending itab data to excel sheet
Hi,
Can any one tell FM for sending internal table data to excel.
Thanks & Regards,
Prasad reddy.
Hi,
If you want open Internal Table data in Excel automatically, try this FM: EXCEL_OLE_STANDARD_DAT.
Here the sample program:
REPORT ZTEST .
TABLES: USR03,DD02L.
DATA: ZX030L LIKE X030L.
DATA BEGIN OF ZDFIES OCCURS 0.
INCLUDE STRUCTURE DFIES.
DATA END OF ZDFIES.
DATA: BEGIN OF FLDITAB OCCURS 0,
FLDNAME(11) TYPE C,
END OF FLDITAB.
DATA ITABUSR03 LIKE USR03 OCCURS 0 WITH HEADER LINE.
DATA TNAME LIKE DD02L-TABNAME.
SELECT * FROM USR03 INTO TABLE ITABUSR03.
TNAME = 'USR03'.
PERFORM GETFIELEDS.
PERFORM SHOW123.
FORM GETFIELEDS.
CALL FUNCTION 'GET_FIELDTAB'
EXPORTING
LANGU = SY-LANGU
ONLY = SPACE
TABNAME = TNAME
WITHTEXT = 'X' IMPORTING
HEADER = ZX030L
TABLES
FIELDTAB = ZDFIES
EXCEPTIONS
INTERNAL_ERROR = 01
NO_TEXTS_FOUND = 02
TABLE_HAS_NO_FIELDS = 03
TABLE_NOT_ACTIV = 04.
CASE SY-SUBRC.
WHEN 0.
LOOP AT ZDFIES.
FLDITAB-FLDNAME = ZDFIES-FIELDNAME.
APPEND FLDITAB.
ENDLOOP.
WHEN OTHERS.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
with SY-SUBRC.
ENDCASE.
ENDFORM.
FORM SHOW123.
CALL FUNCTION 'EXCEL_OLE_STANDARD_DAT'
EXPORTING
FILE_NAME = 'C:USR03'
DATA_SHEET_NAME = 'USER LIST'
TABLES
DATA_TAB = ITABUSR03
FIELDNAMES = FLDITAB
EXCEPTIONS
FILE_NOT_EXIST = 1
FILENAME_EXPECTED = 2
COMMUNICATION_ERROR = 3
OLE_OBJECT_METHOD_ERROR = 4
OLE_OBJECT_PROPERTY_ERROR = 5
INVALID_FILENAME = 6
INVALID_PIVOT_FIELDS = 7
DOWNLOAD_PROBLEM = 8
OTHERS = 9.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
Regards,
Similar Messages
-
How to send ALV output data into Excel sheet format via Mail to the user?
Hi friends,
I have a doubt ie,
How to send ALV output data into Excel sheet format via Mail to the user?
regards
MoosaHi,
Provide the output internal table to the objbin in the below FM
Send Message
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = i_docdata
put_in_outbox = c_x
TABLES
packing_list = i_objpack
object_header = i_objhead
contents_bin = i_objbin
contents_txt = i_objtxt
receivers = i_reclist
and specify the document type
i_objpack-doc_type = 'XLS'.
and try.
Regards,
Nandha -
ALV FUNCTION MODLE FOR GETTING DATA IN EXCEL SHEET
HI ,
CAN I HAVE ALV FUNCTION MODLE FOR GETTING DATA IN EXCEL SHEET
Regards,
ArunaStandard ALV grid uses the FM <b>ALV_XXL_CALL</b> for exporting data into Excel. You can put a break-point in the FM and check it for urself.
for ur info - the above FM takes the internal table name, internal table content and the field catalog as input. -
Upload data from excel sheet into md61
Hi Gurus,
Can anybody please tell me the solution like how to upload the data from excel sheet into the MD61
if u suggest me to write an ABAP code then its fine or any other way would be great
and can u also send me the abap code i would be thankful to allHi,
I can be done in 2 ways.
1. Using LSMW you can upload your MD61 demand thru Excel sheet.
2. You can use BDC to upload the demand from Excel. For this you need to take help from the ABAP. You need to record the macro usinf SHDB and the table maintenance will be taken care by the developer.
For LSMW you need not depend on your developer, as a functional consultant you can do it yourself.
Regards,
V. Suresh -
Getting short dumps while reading bulky data from excel sheet
Hi all,
We have converted our non-unicode based sap system (R/3 4.7, Windows 2003,
SQL 2000) into a unicode based system recently. We are facing two peculiar
problems for last few days.
*Problem 1 - *Whenever we want to upload the data from excel sheet, the
system throws a dump after reading about 400 entries, while last week the
same system used to read about 8000 entries in a single go.
*Problem 2 - *Also, whenever we realease a transport requst from development
containing a lot of changes, the request will reach the quality system but
without the changes. but if i ll try to import the changes into quality
system after generating more than one request containing small small
changes, they get reflected in QAS immediately. Is there any size
constraint in transporting a request fro DEV->QAS->PRD.
Please suggest some ways.
I am pasting the dump (that I am getting while data uploading from Excel).
~~~~~~~~~~~~~~~~~~
Runtime errors
MESSAGE_TYPE_X*
Occurred on
22.02.2008 at
13:21:02*
The current application triggered a termination with a short dump.
What happened?
The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X).
What can you do?
Print out the error message (using the "Print" function)
and make a note of the actions and input that caused the
error.
To resolve the problem, contact your SAP system administrator.
You can use transaction ST22 (ABAP Dump Analysis) to view and administer
termination messages, especially those beyond their normal deletion
date.
Error analysis
Short text of error message:
Control Framework : Error processing control
Technical information about the message:
Diagnosis
An error occurred when the system tried to process the commands
from the Automation Queue on the presentation server.
There are several possible reasons for this:
- The installation of the SAP GUI on the presentation server is
faulty or obsolete.
- There is an error in the application program
- There is an error in the SAPGUI or an integrated control
Procedure
1. Make sure that you have imported the appropriate Support
Package, the current kernel, and GUI patch for the release of your
System
2. Check whether the error occurs locally on one or a few PCs, or
generally on all PCs. Note whether the error only occurs for some
users, for example because of a specific Customizing setting.
If it only occurs locally, this suggests an installation problem
with the PC. Check the installation; if necessary, reinstall the
software. In the dump, search for the SY-MSGLI field, since it may
point to the cause of the error.
3. Activate the Automation Trace (in accordance with SAP Note
158985).
4.Start the transaction and continue until the screen immediately
before the dump.
5. From the System -> Utilities menu, choose Autom. Queue,
Synchronous Processing.
The status bar of the GUI displays the text:
"Automation synchron flush mode on"
6. If you now proceed with the application, the short dump will
display the ABAP call that caused the error; the Automation Trace
will contain the error on the presentation server.
7. If necessary, load the short dump and trace files on to
sapservX, so that SAP can analyze them.
Message classe...... "CNDP"
Number.............. 006
Variable 1.......... " "
Variable 2.......... " "
Variable 3.......... " "
Variable 4.......... " "
Variable 3.......... " "
Variable 4.......... " "
How to correct the error
Probably the only way to eliminate the error is to correct the program.
You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself,
use the following search criteria:
"MESSAGE_TYPE_X" C
"SAPLOLEA" or "LOLEAU02"
"AC_SYSTEM_FLUSH"
If you cannot solve the problem yourself, please send the
following documents to SAP:
1. A hard copy print describing the problem.
To obtain this, select the "Print" function on the current screen.
2. A suitable hardcopy prinout of the system log.
To obtain this, call the system log with Transaction SM21
and select the "Print" function to print out the relevant
part.
3. If the programs are your own programs or modified SAP programs,
supply the source code.
To do this, you can either use the "PRINT" command in the editor or
print the programs using the report RSINCL00.
4. Details regarding the conditions under which the error occurred
or which actions and input led to the error.
System environment
SAP Release.............. "620"
Application server....... "nhbho930"
Network address.......... "192.168.0.30"
Operating system......... "Windows NT"
Release.................. "5.2"
Hardware type............ "4x Intel 801586"
Character length......... 16 Bits
Pointer length........... 32 Bits
Work process number...... 0
Short dump setting....... "full"
Database server.......... "NHBHO930"
Database type............ "MSSQL"
Database name............ "DEV"
Database owner........... "dev"
Character set............ "C"
SAP kernel............... "640"
Created on............... "Aug 17 2007 00:18:58"
Created in............... "NT 5.0 2195 Service Pack 4 x86 MS VC++ 13.10"
Database version......... "SQL_Server_8.00 "
Patch level.............. "196"
Patch text............... " "
Supported environment....
Database................. "MSSQL 7.00.699 or higher, MSSQL 8.00.194"
SAP database version..... "640"
Operating system......... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2,
Windows NT 6.0"
User, transaction...
Client.............. 300
User................ "NHBABAP"
Language key........ "E"
Transaction......... "SE38 "
Program............. "SAPLOLEA"
Screen.............. "SAPMSDYP 0010"
Screen line......... 0
Information on where terminated
The termination occurred in the ABAP program "SAPLOLEA" in
"AC_SYSTEM_FLUSH".
The main program was "ZBDC_CONTRACT ".
The termination occurred in line 29 of the source code of the (Include)
program "LOLEAU02"
of the source code of program "LOLEAU02" (when calling the editor 290).
~~~~~~~~~~~~~~~~~~~~~
Thank you all.
Cheers.
Mitra __.____._for the 50 millionth time: Excel spreadsheets are NOT databases, you should NOT try to use them as such and NEVER access them using JDBC.
You should also under NO condition use the JDBC-ODBC bridge driver (that was actually the 78 millionth time that was told someone). -
Dowloading data from excel sheet
Hi all,
Please tell me the function module to download the data from excel sheet in to the internal table created in program.
And how to download the data from a particular line in the excel sheet into internal table.HI,
TYPES:
BEGIN OF ty_upload,
field1 TYPE c length 12,
field2 TYPE c length 12,
field3 TYPE c length 12,
END OF ty_upload.
DATA it_upload TYPE STANDARD TABLE OF ty_upload WITH DEFAULT KEY.
DATA wa_upload TYPE ty_upload.
DATA itab TYPE STANDARD TABLE OF alsmex_tabline WITH DEFAULT KEY.
FIELD-SYMBOLS: <wa> type alsmex_tabline.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = filename
i_begin_col = 1
i_begin_row = 1
i_end_col = 3
i_end_row = 65535
TABLES
intern = itab.
LOOP AT itab ASSIGNING <wa>.
CASE <wa>-col.
WHEN '0001'.
wa_upload-field1 = <wa>-value.
WHEN '0002'.
wa_upload-field2 = <wa>-value.
WHEN '0003'.
wa_upload-field3 = <wa>-value.
ENDCASE.
APPEND wa_upload TO it_upload.
CLEAR wa_upload.
ENDLOOP
http://www.sap-img.com/abap/upload-direct-excel.htm
<b>Another Program</b>
*& Report UPLOAD_EXCEL *
*& Upload and excel file into an internal table using the following *
*& function module: ALSM_EXCEL_TO_INTERNAL_TABLE *
REPORT UPLOAD_EXCEL no standard page heading.
*Data Declaration
data: itab like alsmex_tabline occurs 0 with header line.
* Has the following format:
* Row number | Colum Number | Value
* i.e. 1 1 Name1
* 2 1 Joe
TYPES: Begin of t_record,
name1 like itab-value,
name2 like itab-value,
age like itab-value,
End of t_record.
DATA: it_record type standard table of t_record initial size 0,
wa_record type t_record.
DATA: gd_currentrow type i.
*Selection Screen Declaration
PARAMETER p_infile like rlgrap-filename.
*START OF SELECTION
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
exporting
filename = p_infile
i_begin_col = '1'
i_begin_row = '2' "Do not require headings
i_end_col = '14'
i_end_row = '31'
tables
intern = itab
exceptions
inconsistent_parameters = 1
upload_ole = 2
others = 3.
if sy-subrc <> 0.
message e010(zz) with text-001. "Problem uploading Excel Spreadsheet
endif.
* Sort table by rows and colums
sort itab by row col.
* Get first row retrieved
read table itab index 1.
* Set first row retrieved to current row
gd_currentrow = itab-row.
loop at itab.
* Reset values for next row
if itab-row ne gd_currentrow.
append wa_record to it_record.
clear wa_record.
gd_currentrow = itab-row.
endif.
case itab-col.
when '0001'. "First name
wa_record-name1 = itab-value.
when '0002'. "Surname
wa_record-name2 = itab-value.
when '0003'. "Age
wa_record-age = itab-value.
endcase.
endloop.
append wa_record to it_record.
*!! Excel data is now contained within the internal table IT_RECORD
* Display report data for illustration purposes
loop at it_record into wa_record.
write:/ sy-vline,
(10) wa_record-name1, sy-vline,
(10) wa_record-name2, sy-vline,
(10) wa_record-age, sy-vline.
endloop.
Regards
Sudheer -
How to read the data in excel sheet
Dear sir,
How to read the data in excel sheet when i recieve a data serial communication... ie i have store a data in excel such that
Cell A Cell B
A Apple
B Ball
C Cat
D Doll
when i recieve A from serial communication i have to display Apple, and when i recieve B i have to display Ball and so on..Hi,
I would recommend you to have a look at the VI attached. It makes use of a VI named 'Read from Spreadsheet' to read the row and column data from the tab delimited excel file. The read data is then searched for the Alphabet specified and finally returns you the corresponding string. The test file used to validate the operation of the VI is also attached.
Trust this would help you solve the issue.
Regards,
Sagar G Yadav | Application Engineer | National Instruments
Attachments:
read_from_excel.vi 10 KB
Book1.txt 1 KB -
Read data from excel sheet and then perform the required operations.
Hi all
I need to write a procedure which can read data from excel sheet.I have excel sheet in which i have to options one is modification and other is addition.so if it reads modification then i need to read the concerned table name then check its availability in pl-sql datbase.If table exists then reading the realated column in that row to fire the querry. The excel sheet is saved in local disk c.
can anybody help me with this.How i need to start specialy to read the data from excel sheet saved in local disk c.
Edited by: user13334062 on Jun 30, 2010 3:45 AMHi
If you can convert the excel to a csv format, then it can be simply query from DB Creating Oracle External Tables. Best part is that you may still change the CSV using EXCEL.
Following action Points can be adopt;
*1. Convert Excel File to a csv. File Save as CSV*
*2. Create Oracle Directory* ( This has to be the location of your excel file )
SQL> Create directory mydir as 'C:\testdb'; --- "testdb" is the location folder in win for your excel sheet.
*3. Create the External Table*
SQL> create table my_ext_tab (
Field1 Datatype,
Field2 Datatype,
Field3 Datatype,
Field4 Datatype,
Field5 Datatype
Organization external
(type oracle_loader default directory mydir
access parameters (records delimited by newline fields terminated by ',')
location ('my_ext_tab.csv'))
reject limit 100;
*4. Now you can query the table "my_ext_tab"*
Select * from "my_ext_tab";
Please avoid the reformat the data column inside the spreadsheet (CSV). -
Uploading data from excel sheets through BDC's into sap system
hi guys,
can you please help me with this. As we use gui_upload to upload data from flat file to sap system, which function module you use to upload data from Excel sheet to sap system through bdc'shello pavan,
welcome to SDN
check the below program
REPORT ZEXCEL_TO_INTERNAL .
data: begin of itab occurs 0,
name(20) type c,
addre(20) type c,
end of itab.
DATA : ITAB1 LIKE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
DATA : B1 TYPE I VALUE 1,
C1 TYPE I VALUE 1,
B2 TYPE I VALUE 100,
C2 TYPE I VALUE 9999.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME =
'C:\Documents and Settings\administrator\Desktop\ppcon001bd_24.xls'
I_BEGIN_COL = B1
I_BEGIN_ROW = C1
I_END_COL = B2
I_END_ROW = C2
TABLES
INTERN = itab1
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop at itab1.
write:/ itab1.
Endlop.
Regards,
Naveen -
How to downlaod vednor master data into excel sheet in SAP Application serv
Hi friends
I want to download SAP vendor master data into excel sheet and the file should be stored in SAP Application server Location with padding zeros.
Please help me.
ThanksHi Ramesh,
It is not possible to download data in Excel file on application server. You can better download the same in tab separated text file and then convert that text file to XLS.
Please do not open multiple threads for same problem.
Regards,
Atish -
How to downlaod vednor master data into excel sheet in SAP Application ser
Hi friends
I want to download SAP vendor master data into excel sheet and the file should be stored in SAP Application server Location with padding zeros.
Please help me.
ThanksHi Ramesh,
You can download the data into application server using the following code. You will have the vendor details in the internal table. Then you will open a file and transfer the data as follows.
* Download internal table to Application server file(Unix)
DATA: e_file like rlgrap-filename value '/usr/sap/tmp/file.txt'.
open dataset e_file for output in text mode.
lOOP AT it_datatab......
transfer it_datatab to e_file.
ENDLOOP.
close dataset e_file.
In application server you will have only files and not excel sheets.
Reward points if useful,
Aleem. -
Facing problem in writing data to excel sheet using ActiveX
Hi.
I want to write data from a one dimesional array to a particular excel sheet in a particular row.Please see the attached vi for explantion.
It is giving error.But If I give a new file name when the appliation is getting closed it is writing data to the new excel file.
Please help.
Thanks in advance
Attachments:
Excel sheetWrite.vi 90 KBThanks Jhoskin and Rudi .......
I am able to write data to excel sheet now. I am attaching one"test.zip" file that contains a VI named "Squence.vi "that contains another subVI named "Write U94006 Table To XL.vi"which does the functionality of counting the number of rows in the excel sheet and writing data in the next blank row. I am using the same subVI in the VI named "Sequence.vi"two times so it is taking a lot of time in opening and closing the excel sheet. Will you please suggest some way of calling the subVI only one time.
Rikki
Attachments:
Test.zip 105 KB -
Downloading table data into Excel sheet - Webdynpro Java
Hi All,
We have developed a custom webdynpro application that executes an RFC and displays data in Table UI element. We have provided a button to download the data in excel sheet. When data is huge like, total number of rows filled up in the table are around 11,000 & columns are 32, and when user tries to download whole 11000 rows in excel sheet, the timeout occurs after 20 mins due to huge data. But when I apply filtering on the same table data and then try to download some 700 rows out of 11000 into excel, it took me around 3.36 mins.
If anyone encountered such scenario in past, please guide in this regard to speed-up the download to excel functionality or suggest any other alternative.
We are using 7.3 Portal and tableUtilities java class for export to excel functionality.
Thanks,
Amol.hi monica ,
sorry im not able to understand properly ,
The server don't restarts automatically when we uploading a huge data, onlly we open the file instead of save the file.
If we save the file the problem is that when we try to open this, the process can take hours and sometimes excel is blocked
you mean that after saving the file to your desktop , having huge data you are not able to open the file i.e the excel file. your file gets blocked or consumes more time to open the file ,
or else when you are prompted for saving or opening , on click of opening you are facing the problem ?
let me be clear with your part , here your application deals with uploading the data from webdynpro table to excel sheet and allowing the end user to save or open the file right .
Regards
Govardan Raj S -
Urgent - Migrate data from Excel sheets
Hello all..
I want to move data from excel sheets into oracle9i Database
I have a bout 50 table with average of 5000 row per table
How could I do it
I will be so obligated if you could detail it for me
Thanks in advanceI want to insert data using loader in the table Tablename
Name Type
CL_CL_CODE NUMBER(3)
SUBCL_CODE VARCHAR2(50)
SUBCL_NAME NUMBER(2)
P_CODE_LENTH NUMBER(3)
SCE_NAME VARCHAR2(50)
I use this statement:
load data
infile 'D:\Sqlldr\load.dat'
replace
into table subclasses
FIELDS TERMINATED BY ";" OPTIONALLY ENCLOSED BY '"'
(CL_CL_CODE,SUBCL_CODE,SUBCL_NAME,P_CODE_LENTH SCE_NAME)
I need to use default value for the column SCE_NAME,P_CODE_LENTH
what is the formula for this
Thanks -
How to upload datas in excel sheet through BDC
Hi,
I know how to upload datas in Text format through BDC...Suppose even when datas are in .xls format,I saved that file as Text(tab delimited) format...then file become text format and it can be easily uploaded....
So, I want to know How to upload datas in excel sheet through BDChi,
try this Example, hope useful to u, assign me point.
report ZMSV1_BDC_CALL
no standard page heading line-size 255.
*include bdcrecx1.
*parameters: dataset(132) lower case.
DO NOT CHANGE - the generated data section - DO NOT CHANGE ***
If it is nessesary to change the data section use the rules:
1.) Each definition of a field exists of two lines
2.) The first line shows exactly the comment
'* data element: ' followed with the data element
which describes the field.
If you don't have a data element use the
comment without a data element name
3.) The second line shows the fieldname of the
structure, the fieldname must consist of
a fieldname and optional the character '_' and
three numbers and the field length in brackets
4.) Each field must be type C.
Generated data section with specific formatting - DO NOT CHANGE ***
data: begin of record,
data element: BUKRS
BUKRS_001(004),
data element: KTOKK
KTOKK_002(004),
data element: NAME1_GP
NAME1_003(035),
data element: SORTL
SORTL_004(010),
data element: ORT01_GP
ORT01_005(035),
data element: LAND1_GP
LAND1_006(003),
data element: SPRAS
SPRAS_007(002),
data element: BANKS
BANKS_01_008(003),
data element: BANKK
BANKL_01_009(015),
data element: BANKN
BANKN_01_010(018),
end of record.
End generated data section ***
data: itab like record occurs 0 .
data: it_bdc type bdcdata occurs 0 with header line.
data: it_msg type bdcmsgcoll occurs 0 with header line.
parameter p_file type rlgrap-filename default 'c:\vendor.txt' obligatory
start-of-selection.
perform open_dataset using p_file.
perform open_group.
*perform close_group.
*perform close_dataset using dataset.
*& Form open_dataset
text
-->P_P_FILE text
form open_dataset using p_p_file.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = p_file
FILETYPE = 'DAT'
HEADLEN = ' '
LINE_EXIT = ' '
TRUNCLEN = ' '
USER_FORM = ' '
USER_PROG = ' '
DAT_D_FORMAT = ' '
IMPORTING
FILELENGTH =
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.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform. " open_dataset
*& Form open_group
text
--> p1 text
<-- p2 text
form open_group .
loop at itab into record.
perform bdc_dynpro using 'SAPMF02K' '0105'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-KTOKK'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02K-BUKRS'
record-BUKRS_001.
perform bdc_field using 'RF02K-KTOKK'
record-KTOKK_002.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-ORT01'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFA1-NAME1'
record-NAME1_003.
perform bdc_field using 'LFA1-SORTL'
record-SORTL_004.
perform bdc_field using 'LFA1-ORT01'
record-ORT01_005.
perform bdc_field using 'LFA1-LAND1'
record-LAND1_006.
perform bdc_field using 'LFA1-SPRAS'
record-SPRAS_007.
perform bdc_dynpro using 'SAPMF02K' '0120'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0130'.
perform bdc_field using 'BDC_CURSOR'
'LFBK-KOINH(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'LFBK-BANKS(01)'
record-BANKS_01_008.
perform bdc_field using 'LFBK-BANKL(01)'
record-BANKL_01_009.
perform bdc_field using 'LFBK-BANKN(01)'
record-BANKN_01_010.
perform bdc_dynpro using 'SAPMF02K' '0130'.
perform bdc_field using 'BDC_CURSOR'
'LFBK-BANKS(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02K' '0210'.
perform bdc_field using 'BDC_CURSOR'
'LFB1-AKONT'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0215'.
perform bdc_field using 'BDC_CURSOR'
'LFB1-ZTERM'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0220'.
perform bdc_field using 'BDC_CURSOR'
'LFB5-MAHNA'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
call transaction 'FK01' using it_bdc mode 'A' update 'S'
messages into it_msg.
write:/ sy-subrc.
perform message_formatwrite.
refresh it_bdc.
clear it_bdc.
endloop.
endform. " open_group
*& Form message_formatwrite
text
--> p1 text
<-- p2 text
form message_formatwrite .
data:l_msg(10).
loop at it_msg.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = SY-MSGID
LANG = sy-langu
NO = SY-MSGNO
V1 = SY-MSGV1
V2 = SY-MSGV2
V3 = SY-MSGV3
V4 = SY-MSGV4
IMPORTING
MSG = l_msg
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endloop.
endform. " message_formatwrite
*& Form bdc_dynpro
text
-->P_0112 text
-->P_0113 text
form bdc_dynpro using value(p_0112)
value(p_0113).
it_bdc-program = p_0112.
it_bdc-dynpro = p_0113.
it_bdc-dynbegin = 'X'.
append it_bdc.
clear it_bdc.
endform. " bdc_dynpro
*& Form bdc_field
text
-->P_0117 text
-->P_0118 text
form bdc_field using value(p_0117)
value(p_0118).
it_bdc-fnam = p_0117.
it_bdc-fval = p_0118.
append it_bdc.
clear it_bdc.
endform. " bdc_field
Regards
fareedas
Maybe you are looking for
-
How does the DAQmx read.vi work in producer/consumer mode
Dear all, I have one question: how does the DAQmx read.vi work in producer/consumer mode ? I mean if i set the acquisition samples quantity is 5000,(see the enclosed picture), how does the DAQmx read.vi acquire the samples ? 5000 samples one time ?
-
Lost Security Profile Password
I'm using Acrobat Pro 7.0 and have misplaced the password on a security profile. When I originally set it up, I checked the box that said "Save Passwords with Policy". Is there a way I can retrieve the password from my Windows XP system?
-
SQL challenge: avoid this self-join!!!
Here's something of a challenging SQL problem. I'm trying to persist an arbitrary number of attributes for an object. I am trying to do this in a regular relational table both for performance and to make future upgrades easier. The problem is that I
-
Creating Workflow Container Elements
Hi, I am looking to create two new workflow container elements of lenght 80char for 'WS92000027' inorder to hold the required name to be outputted in the workflow . Could you please let me know setp by step procedure to achive this as
-
Many emails are coming blanks or scrambled and unreadable
Some email arrived as blank. Many email that are being sent with edited tables (probably done in Excel) are coming scrambled and unreadable. Need help in fixing this problem like the following: Sub Lot Lot Description Supplier Supplier Name PO Number