How to insert more than 12 items using BDC for MB1C
Hi,
When we use LSMW for data transfer of MB1C transaction, more than 12 items can be inserted in a document.
But using BDC only 12 and below is possible, if the flat file system has more that 12 item, then the document is not created.
How to insert more than 12 item in a document.
Regards
Hi Gow,
I have uploaded the MB1C through a BDC and it is working fine for n no of items.
Here is the code. May be this will be of your help.
*& Report ZMB1C
report ZMB1C
no standard page heading line-size 255.
type-pools : slis.
tables : t100.
data: begin of record,
MATNR(018),
ERFMG(017),
EXBWR(016),
end of record.
data : itab like table of record with header line.
data : w_bdcdata type bdcdata.
data : t_bdcdata type standard table of bdcdata initial size 1.
data : messtab type standard table of bdcmsgcoll with header line.
data : mstring(300).
data : vf_index type i,
no_lines type i,
count type i value 0.
data : v_bldat(20),
v_budat(20).
*Excel Sheet Data Upload Details
data : vf_start_col type i value '1', "start column
vf_start_row type i value '2', "start row
vf_end_col type i value '100', "maximum column
vf_end_row type i value '10000'. "maximum row
*/ Internal Table For Excel Data
data : it_excel type kcde_cells occurs 0 with header line.
*/ Field symbol
field-symbols : <fs>.
data : begin of it_messtab occurs 0,
plant(10) type c,
status(10) type c,
message(90) type c,
end of it_messtab.
*Data for ALV display
data : wa_fcat type slis_fieldcat_alv,
colcnt type i.
data : it_fieldcat type slis_t_fieldcat_alv,
i_events type slis_t_event.
data : l_title type sychar70.
data : l_repid like sy-repid.
* Selction Screen
selection-screen begin of block b1 with frame title text-000.
parameters : p_file like ibipparms-path obligatory,
p_mode like ctu_params-dismode default 'A'.
selection-screen end of block b1.
selection-screen begin of block b2 with frame title text-001.
parameters : p_bldat like MKPF-BLDAT obligatory,
p_budat like MKPF-BUDAT obligatory,
p_bwart like RM07M-BWARTWA obligatory,
p_werks like RM07M-WERKS obligatory,
p_lgort like RM07M-LGORT obligatory.
selection-screen end of block b2.
* At Selction Screen
at selection-screen on value-request for p_file.
call function 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = ''
IMPORTING
file_name = p_file.
*Start of Selection Event
start-of-selection.
call function 'KCD_EXCEL_OLE_TO_INT_CONVERT'
EXPORTING
filename = p_file
i_begin_col = vf_start_col
i_begin_row = vf_start_row
i_end_col = vf_end_col
i_end_row = vf_end_row
TABLES
intern = it_excel
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.
if it_excel[] is initial.
MESSAGE I000(ZCL_TCSABAP).
else.
sort it_excel by row col.
loop at it_excel.
move : it_excel-col to vf_index.
assign component vf_index of structure itab to <fs>.
move : it_excel-value to <fs>.
at end of row.
append itab.
clear itab.
endat.
endloop.
endif.
if not itab[] is initial.
DESCRIBE TABLE itab LINES no_lines.
clear messtab.
refresh messtab.
CONCATENATE p_bldat+6(2) '.' p_bldat+4(2) '.' p_bldat(4) into v_bldat.
CONCATENATE p_budat+6(2) '.' p_budat+4(2) '.' p_budat(4) into v_budat.
perform map_rec.
call transaction 'MB1C' using t_bdcdata mode p_mode update 'A'
messages into messtab .
clear t_bdcdata.
refresh t_bdcdata.
loop at messtab where msgtyp = 'E' or msgtyp = 'S' .
select single * from t100 where sprsl = messtab-msgspra
and arbgb = messtab-msgid
and msgnr = messtab-msgnr.
if sy-subrc = 0.
mstring = t100-text.
if mstring cs '&1'.
replace '&1' with messtab-msgv1 into mstring.
replace '&2' with messtab-msgv2 into mstring.
replace '&3' with messtab-msgv3 into mstring.
replace '&4' with messtab-msgv4 into mstring.
else.
replace '&' with messtab-msgv1 into mstring.
replace '&' with messtab-msgv2 into mstring.
replace '&' with messtab-msgv3 into mstring.
replace '&' with messtab-msgv4 into mstring.
endif.
condense mstring.
it_messtab-message = mstring(300).
it_messtab-plant = p_werks.
if messtab-msgtyp = 'E'.
it_messtab-status = 'Error'.
else.
it_messtab-status = 'Success'.
endif.
append it_messtab.
clear it_messtab.
endif.
endloop. "messtab
if not it_messtab[] is initial.
perform buildcatalog.
perform display.
endif.
endif.
*& Form Map_Rec
* text
form map_rec.
perform bdc_dynpro using 'SAPMM07M' '0400'.
perform bdc_field using 'BDC_CURSOR'
'RM07M-WVERS3'.
perform bdc_field using 'BDC_OKCODE'
'NPE'.
perform bdc_field using 'MKPF-BLDAT'
v_bldat.
perform bdc_field using 'MKPF-BUDAT'
v_budat.
perform bdc_field using 'RM07M-BWARTWA'
p_bwart.
perform bdc_field using 'RM07M-WERKS'
p_werks.
perform bdc_field using 'RM07M-LGORT'
p_lgort.
perform bdc_field using 'XFULL'
perform bdc_field using 'RM07M-XNAPR'
'X'.
perform bdc_field using 'RM07M-WVERS2'
perform bdc_field using 'RM07M-WVERS3'
'X'.
loop at itab.
count = count + 1.
perform bdc_dynpro using 'SAPMM07M' '0410'.
perform bdc_field using 'BDC_CURSOR'
'MSEG-EXBWR'.
if count <> no_lines.
perform bdc_field using 'BDC_OKCODE'
'=NPE'.
elseif count = no_lines.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
endif.
perform bdc_field using 'MSEG-MATNR'
itab-MATNR.
perform bdc_field using 'MSEG-ERFMG'
itab-ERFMG.
perform bdc_field using 'MSEG-EXBWR'
itab-EXBWR.
endloop. "itab
endform. "Map_Rec
** Form BDC_DYNPRO
form bdc_dynpro using program dynpro.
clear w_bdcdata.
w_bdcdata-program = program.
w_bdcdata-dynpro = dynpro.
w_bdcdata-dynbegin = 'X'.
append w_bdcdata to t_bdcdata.
endform. "bdc_dynpro
** Form BDC_FIELD
form bdc_field using fnam fval.
if fval <> space.
clear w_bdcdata.
w_bdcdata-fnam = fnam.
w_bdcdata-fval = fval.
append w_bdcdata to t_bdcdata.
else.
clear w_bdcdata.
w_bdcdata-fnam = fnam.
w_bdcdata-fval = fval.
append w_bdcdata to t_bdcdata.
endif.
endform. "bdc_field
* FORM buildcatalog *
form buildcatalog.
clear wa_fcat.
clear it_fieldcat.
colcnt = colcnt + 1.
wa_fcat-col_pos = colcnt.
wa_fcat-fieldname = 'PLANT'.
wa_fcat-tabname = it_messtab.
wa_fcat-seltext_l = 'PLANT'.
wa_fcat-key = 'X'.
wa_fcat-outputlen = '10'.
append wa_fcat to it_fieldcat.
clear wa_fcat.
colcnt = colcnt + 1.
wa_fcat-col_pos = colcnt.
wa_fcat-fieldname = 'STATUS'.
wa_fcat-tabname = it_messtab.
wa_fcat-seltext_l = 'STATUS'.
wa_fcat-outputlen = '10'.
append wa_fcat to it_fieldcat.
clear wa_fcat.
colcnt = colcnt + 1.
wa_fcat-col_pos = colcnt.
wa_fcat-fieldname = 'MESSAGE'.
wa_fcat-tabname = it_messtab.
wa_fcat-seltext_l = 'Message'.
wa_fcat-outputlen = '90'.
append wa_fcat to it_fieldcat.
endform. "buildcatalog
* FORM display *
form display.
l_title = text-002.
l_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = l_repid
i_grid_title = l_title
it_fieldcat = it_fieldcat
it_events = i_events[]
TABLES
t_outtab = it_messtab
EXCEPTIONS
program_error = 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.
endform. "display
Regards,
Amit
Similar Messages
-
How to insert more than 32k xml data into oracle clob column
how to insert more than 32k xml data into oracle clob column.
xml data is coming from java front end
if we cannot use clob than what are the different options availableAre you facing any issue with my code?
String lateral size error will come when you try to insert the full xml in string format.
public static boolean writeCLOBData(String tableName, String id, String columnName, String strContents) throws DataAccessException{
boolean isUpdated = true;
Connection connection = null;
try {
connection = ConnectionManager.getConnection ();
//connection.setAutoCommit ( false );
PreparedStatement PREPARE_STATEMENT = null;
String sqlQuery = "UPDATE " + tableName + " SET " + columnName + " = ? WHERE ID =" + id;
PREPARE_STATEMENT = connection.prepareStatement ( sqlQuery );
// converting string to reader stream
Reader reader = new StringReader ( strContents );
PREPARE_STATEMENT.setClob ( 1, reader );
// return false after updating the clob data to DB
isUpdated = PREPARE_STATEMENT.execute ();
PREPARE_STATEMENT.close ();
} catch ( SQLException e ) {
e.printStackTrace ();
finally{
return isUpdated;
Try this JAVA code. -
How to display more than one column with for each
Hi guys,
how to display more than one column with for each like below?
for each
Item1
Item2
Item3
Item4
Item5
Item6
Item7
Item8
Item9
Item10
End for each
for each
Item1 Item2 Item3
Item4 Item5 Item6
Item7 Item8 Item9
Item10
End for eachTake a look at this to see if the solution provided would work for you: https://blogs.oracle.com/xmlpublisher/entry/multi_column_row_woes
Won't you have more than 10 records in your data file ? If you are going to have only 10 items then you may be able to use position() function to limit it to 3 each..
Take a look at this: https://blogs.oracle.com/xmlpublisher/entry/turning_rows_into_columns
Thanks,
Bipuser -
How to insert more than 4000 bytes in BLOB column
Hi all,
My oracle version is Oracle Database 11g Enterprise Edition Release 11.2.0.3.0.
I have checked in google and in this forum also, but did not find the answer.
When inserting into less than 4000 bytes, it is inserting without any issues. If i am inserting more than that, it is throwing
error like this ORA-01460: unimplemented or unreasonable conversion requested.
Can anybody guide me how to do this or link.
Thanks in advance.
Thanks,
Paluser546710 wrote:
Hi,
Thank you very much for your reply.
Before, I have not worked with BLOB column, so I don't know much about its using. Currently, I am using direct
insert statement only. Its a normal stored procedure written in a package. I am calling this SP with other columns and
with this BLOB column. I am able to insert into table, if the inserted file is less than 4000 bytes. If it is more than that,
I am getting that problem.
Thanks,
VenuSQL variables can only hold 4000 bytes.
PL/SQL can hold up to 32767
I am getting that problem. 100% lacking in actionable detail
post code & COMPLETE error message & code -
How to have more than one free good for a material ?
Hi everyone,
we have this requirement from the user where he wants give more than one free good for a material.
As far as i know we can configure only one free good for a material in standard SAP.
if have any idea about how to achieve this please guide me how to configure the same in SAP.
thank you in advanceHi
Check my two links where I have explained this.
Free goods using Sale order BOM methodology
Different business scenarios and Sales BOM techniques for header and item level stock and prices
Thank$ -
How to have more than 8 release code for a release strategy
Hi,
In standard only 8 level of release is possible for a release strategy. Our client requires more than 8 levels i.e., more than 8 release codes for a release strategy. How can we achieve this?
Pls provide your views/ideas.
Reards,Hello,
In case you require more than 8 levels in release strategy , write to SAP, maybe they could give a fitting reply.
By the way , 8 levels of release should be more than enough . Try to incorporate the client business process
within this.
Regards
Anis -
How to insert more than one row in an Oracle table in one go
Hi All,
I am working on a file-XI(BPM)-Oracle scenario.
I am sending an xml file to XI via a file adapter. On the receiver end i am using a jdbc adapter to insert the row in the database. There is a transformation step within the BPM which is converting the file to a format understood by the JDBC adapter.
The problem i am facing is that, even if my input xml file contains more than one recordset, only one row is created in the database with the first recordset.
How can i insert all the other recordsets in the database at the same time.
Pls guide
Thanks in advance.
Regards
NeetuHi,
As asked by Bhavesh, i set the occurence of the STATEMENT tab 1 to UB. But still only one row is getting updated in the database at a time.
As asked by Udo, i even tried the same by changing the occrence of ACCESS tab 1 to UB. But still same thing happened.
Can there be some other problem.
The transformation is being dane in the BPM.
As seen in SXMB_MONI, the input xml to the BPM has two RECORDSET tags but the output generated xml in the format understood by jdbc adapter has a single STATEMENT tag.
The two formats are given below
<b>Input:</b>
<?xml version="1.0" encoding="utf-8"?>
<ns:MT_Test_File xmlns:ns="http://namespace-EmpNumberGen">
<EmpGenRecord>
<APPLICANT_NO>20</APPLICANT_NO>
<FIRST_NAME>abc</FIRST_NAME>
<LAST_NAME>xyz</LAST_NAME>
<FUNCTION>ADMIN</FUNCTION>
<DESIGNATION>ZA</DESIGNATION>
<RESPONSIBILITY_LEVEL>dd</RESPONSIBILITY_LEVEL>
<RECRUITMENT_TYPE>dd</RECRUITMENT_TYPE>
<EMPLOYEE_TYPE>p</EMPLOYEE_TYPE>
<STATUS>A</STATUS>
<***>M</***>
</EmpGenRecord>
<EmpGenRecord>
<APPLICANT_NO>14</APPLICANT_NO>
<FIRST_NAME>abc</FIRST_NAME>
<LAST_NAME>xyz</LAST_NAME>
<FUNCTION>ADMIN</FUNCTION>
<DESIGNATION>ZA</DESIGNATION>
<RESPONSIBILITY_LEVEL>dd</RESPONSIBILITY_LEVEL>
<RECRUITMENT_TYPE>dd</RECRUITMENT_TYPE>
<EMPLOYEE_TYPE>p</EMPLOYEE_TYPE>
<STATUS>A</STATUS>
<***>M</***>
</EmpGenRecord>
</ns:MT_Test_File>
<b>Output</b>
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_Emp_No_Generation xmlns:ns0="http://namespace-EmpNumberGen">
<Statement>
<SAP_EMPGEN action="INSERT">
<access>
<APPLICANT_NO>20</APPLICANT_NO>
<FIRST_NAME>abc</FIRST_NAME>
<LAST_NAME>xyz</LAST_NAME>
<FUNCTION>ADMIN</FUNCTION>
<DESIGNATION>ZA</DESIGNATION>
<RESPONSIBILITY_LEVEL>dd</RESPONSIBILITY_LEVEL>
<RECRUITMENT_TYPE>dd</RECRUITMENT_TYPE>
<EMPLOYEE_TYPE>p</EMPLOYEE_TYPE>
<STATUS>A</STATUS>
<***>M</***>
</access>
</SAP_EMPGEN>
</Statement>
</ns0:MT_Emp_No_Generation>
This is a bit urgent.
Pls help
Regards
Neetu -
How to Insert more than one record at a time- with fixed set of values in one field
Can someone guide as to how to insert multiple records at a time using ASP VBScript in Dreamweaver CS4 or ADDT.
If someone can guide then the exact problem is given below.
I have a MS access database with one table. The table has three fields. The first field is an autonumber field for ID number.
The second field contains string values- One out of 7 predefined values. One set of records consists of 7 records containing all the seven types of predefined values in fields no 1.
The third field is a numeric field and can contain integers.
I want that the user can enter data for the table using an ASP form in such a way that he enters one set of records at a time in one single screen. This way he will not have to remember that he has /has not entered all the seven set of values for the field no 1.
I am not creating fields with the 7 types of field1value as their names as it will increase the number of fields drastically.
Please help for dreamweaver ASP VBScript.I have successfully inserted seven records in one form submit operation by looping through the command object execute method.
However, the data that is being inserted by the command object is repetition of the first record and the command object is not taking any data from the text boxes for the second record onwards. In this I had used the isert record behavious generated by DW CS4 and modified it to suit my requirement. However, the data inserted in the first row is getting repeated in all the seven rows.
Please help.
Also advise if there are any free dreamweaver server side validation extensions available. -
How to Insert more than one record at a time
How to insert multiple records at a time?
If someone can advise on this, then the actual problem is described below:
I have a MS access database with one table. The table has three fields. The
first field is an autonumber field for ID number.
The second field contains string values- One out of 7 predefined values. One
set of records consists of 7 records containing all the seven types of
predefined values in fields no 1.
The third field is a numeric field and can contain integers.
I want that the user can enter data for the table using an ASP form in such
a way that he enters one set of records at a time in one single screen. This
way he will not have to remember that he has /has not entered all the seven
set of values for the field no 1.
I am not creating fields with the 7 types of field1value as their names as
it will increase the number of fields drastically.
Please help with inserting multiple records at a time.I have successfully inserted seven records in one form submit operation by looping through the command object execute method.
However, the data that is being inserted by the command object is repetition of the first record and the command object is not taking any data from the text boxes for the second record onwards. In this I had used the isert record behavious generated by DW CS4 and modified it to suit my requirement. However, the data inserted in the first row is getting repeated in all the seven rows.
Please help.
Also advise if there are any free dreamweaver server side validation extensions available. -
How to insert more than one values
Oracle 9i
Hi all
I have 80 values how to insert it in a single time, it is in production
This is my insert statement
Insert into FND_LOOKUP_VALUES
(LOOKUP_TYPE,LANGUAGE,LOOKUP_CODE,MEANING,DESCRIPTION,ENABLED_FLAG,
START_DATE_ACTIVE,END_DATE_ACTIVE,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,L
AST_UPDATE_LOGIN,
LAST_UPDATE_DATE,SOURCE_LANG,SECURITY_GROUP_ID,VIEW_APPLICATION_ID,TERRITORY
_CODE,
ATTRIBUTE_CATEGORY,ATTRIBUTE1,ATTRIBUTE2,ATTRIBUTE3,ATTRIBUTE4,ATTRIBUTE5,AT
TRIBUTE6,ATTRIBUTE7,ATTRIBUTE8,ATTRIBUTE9,ATTRIBUTE10,ATTRIBUTE11,ATTRIBUTE1
2,ATTRIBUTE13,ATTRIBUTE14,ATTRIBUTE15,TAG,LEAF_NODE)
values ('XXHDNL_SHIPPABLE_POSTCODES','US','CF47 9','CF47 9','CF47 9','Y',
to_date('23-JUL-09','DD-MON-RR'),null,1090,to_date('23-JUL-09','DD-MON-RR'),
1090,47626,to_date('23-JUL-09','DD-MON-RR'),'US',0,3,null,null,null,null,nul
l,null,null,null,null,null,null,null,null,null,null,null,null,null,null);
I need to change the values in the field LOOKUP_CODE,MEANING,DESCRIPTION
there are 80 values it takes time to insert one one value each time.
The values are like this
DE1,DE1,DE1
D3,D3,D3
DE5,DE5,DE5
DE11,DE11,DE11
DE12,DE12,DE12
DE13,DE13DE13
How to do this?
Any help is highly appricatble
Thanks & regards
Srikkanth.M
Edited by: Srikkanth.M on Jan 14, 2011 6:04 PMIf the code is autonumeric ... then try
insert into FND_LOOKUP_VALUES (LOOKUP_TYPE,
LANGUAGE,
LOOKUP_CODE,
MEANING,
DESCRIPTION,
ENABLED_FLAG,
START_DATE_ACTIVE,
CREATED_BY,
CREATION_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_LOGIN,
LAST_UPDATE_DATE,
SOURCE_LANG,
SECURITY_GROUP_ID,
VIEW_APPLICATION_ID
SELECT 'XXHDNL_SHIPPABLE_POSTCODES',
'US',
'DE' || level,
'DE' || level,
'DE' || level,
'Y',
to_date('23-JUL-09','DD-MON-RR'),
1090,
to_date('23-JUL-09','DD-MON-RR'),
1090,
47626,
to_date('23-JUL-09','DD-MON-RR'),
'US',
0,
3
from dual connect by level < 81 -
How to associate more than one security group for UCM documents?
When checking in a document we are only able to associate one security group to documents. In our case, a particular document can be seen by more than one group e.g a document can be seen bu both finance and marketing groups.
How can we associate more than one group for documents?
Our requirement is related to search. We want to display the documents to the end user based on the security group that is associated with the document. We are planning to use IDM and have all the groups/roles that are possible in the end site (also delivered by same ldap) available in UCM so that when checking in the documents we can associate desired groups who can see these documents.
Regards,
PratapOne thing before all, is that I suggest that you think through your security model before implementing it in UCM. You should ask yourself questions like :
- Is security really based on department ?
- Why two departments need to have access to the same category of document ?
- Is it really security that I need or classification ? Is it a problem if Accouting have access to Finance or you just don't want Marketing documents in a finance related search ?
- Maybe what you want is that finance guys to have access to marketing document.
Without a clear business security model, it's hard to find a UCM security model as it is impossible to associate 2 security groups to one document. -
How to add more than one JSP file for a single JSPDYNPage component
Hello Everyone,
I am creating one portal application which involves JSPDYNPage component, while creating this component one JSP file is also created. But i want one more JSP file for my application ...i.e- for the same JSPDYNPage component. can anybody tell me how to create one more JSP for the same component.
Thanks
Chetan DeshpandeHi Pooja,
I tried the way u said, but when i try to create it(i.e- right click on pagelet folder & then new---> other......the way u said.) it asks for JSP file name but finish button is disabled even after entering the JSP file name.....is it that i am doing something wrong....please guide me for this & one more thing it asks for folder name also ...where to store that file....but when i try to enter anything.It doesn't show or doesn't allow me to do so
Thanks
Chetan -
Reg:how to post the parked documents using BDC
Duplicate message in General deleted. Please do not post the same question in more than one forum.
Hi
I am creating parked Documents using FV50. I am able to check them using FBV0, I am able to select and post the documents using the same transaction. Its working fine. However I want to post the selected parked documents using BDC. I am having problems as the output in FBV0 is in ALV report format. HAving problems selcting the parked documents to be posted. As there any way to post the selected parked documents using BDC.
Please suggest me a solution for this.
Thanks,
Satish
Edited by: Matt on Dec 3, 2008 7:40 PMHi Rob,
Thank you for ur reply, can u send that code how u post the parked documents using BDC for FBV0 transaction. Please send the code.
Thanks,
Satish -
How to insert multiple line items in fv60 using bdc.
Hi all,
How to insert multiple line items in fv60 using bdcshi
chk this
DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
DATA : IT_MESSAGES LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA : V_EBELP(30) , V_MENGE(30) , V_WERKS(30), V_EMATN(30) ,
V_PEINH(30).
DATA : FILE TYPE STRING, V_MSG(100) , V_IND(2) TYPE N , FLAG VALUE 'X'.
PARAMETERS: P_FILE(50) TYPE C DEFAULT 'C:\ME21_TEST'.
DATA : BEGIN OF ITAB OCCURS 0,
IND(02),
LIFNR_001(010),
data element: BSART
BSART_002(004),
data element: BEDAT
data element: EKORG
EKORG_004(004),
EKGRP_006(003),
data element: LPEIN
LPEIN_005(001),
data element: EMATNR
EMATN_01_007(018),
data element: EWERK
WERKS_01_008(004),
data element: EPEIN
PEINH_01_009(006),
data element: EWERK
MENGE_01_013(017),
data element: AUFEP
EBELP_014(005),
data element: AUFEP
END OF ITAB.
START-OF-SELECTION.
FILE = P_FILE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = FILE
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = ITAB
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SORT ITAB BY IND.
START-OF-SELECTION.
LOOP AT ITAB.
REFRESH IT_MESSAGES.
<b>V_IND = V_IND + 1.</b>
<b>AT NEW IND.</b>
<b>READ TABLE ITAB INDEX SY-TABIX.</b>
PERFORM BDC_DYNPRO USING 'SAPMM06E' '0100'.
PERFORM BDC_FIELD USING 'EKKO-LIFNR'
ITAB-LIFNR_001.
PERFORM BDC_FIELD USING 'RM06E-BSART'
ITAB-BSART_002.
*perform bdc_field using 'RM06E-BEDAT'
ITAB-BEDAT_003.
PERFORM BDC_FIELD USING 'EKKO-EKORG'
ITAB-EKORG_004.
PERFORM BDC_FIELD USING 'RM06E-LPEIN'
ITAB-LPEIN_005.
PERFORM BDC_FIELD USING 'EKKO-EKGRP'
ITAB-EKGRP_006.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
ENDAT.
<b>PERFORM BDC_DYNPRO USING 'SAPMM06E' '0120'.
CONCATENATE 'EKPO-EMATN(' V_IND ')' INTO V_EMATN.
PERFORM BDC_FIELD USING V_EMATN
ITAB-EMATN_01_007.
CONCATENATE 'EKPO-WERKS(' V_IND ')' INTO V_WERKS.
PERFORM BDC_FIELD USING V_WERKS
ITAB-WERKS_01_008.
CONCATENATE 'EKPO-PEINH(' V_IND ')' INTO V_PEINH.
PERFORM BDC_DYNPRO USING 'SAPMM06E' '0120'.
PERFORM BDC_FIELD USING V_PEINH
ITAB-PEINH_01_009.
*CONCATENATE 'EKPO-MENGE(' V_IND ')' INTO V_MENGE.
*perform bdc_dynpro using 'SAPMM06E' '0120'.
*perform bdc_field using V_MENGE
ITAB-MENGE_01_013.
*CONCATENATE 'EKPO-EBELP(' V_IND ')' INTO V_EBELP.
PERFORM BDC_DYNPRO USING 'SAPMM06E' '0120'.
PERFORM BDC_FIELD USING 'RM06E-EBELP'
ITAB-EBELP_014.</b>PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
AT END OF IND.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=BU'.
ENDAT.
CALL TRANSACTION 'ME21' USING IT_BDCDATA MODE 'A'
UPDATE 'S'
MESSAGES INTO IT_MESSAGES.
LOOP AT IT_MESSAGES WHERE MSGTYP = 'E' OR MSGTYP = 'A'.
IF FLAG = 'X'.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
DEST = FILLER8
GROUP = 'GAMY_FAILURE'
HOLDDATE = FILLER8
KEEP = 'X'
USER = SY-UNAME
RECORD = FILLER1
PROG = SY-CPROG
IMPORTING
QID =
EXCEPTIONS
CLIENT_INVALID = 1
DESTINATION_INVALID = 2
GROUP_INVALID = 3
GROUP_IS_LOCKED = 4
HOLDDATE_INVALID = 5
INTERNAL_ERROR = 6
QUEUE_ERROR = 7
RUNNING = 8
SYSTEM_LOCK_ERROR = 9
USER_INVALID = 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.
CLEAR FLAG.
ENDIF.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'ME21'
POST_LOCAL = NOVBLOCAL
PRINTING = NOPRINT
SIMUBATCH = ' '
CTUPARAMS = ' '
TABLES
DYNPROTAB = IT_BDCDATA
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = IT_MESSAGES-MSGID
LANG = 'EN'
NO = IT_MESSAGES-MSGNR
V1 = IT_MESSAGES-MSGV1
V2 = IT_MESSAGES-MSGV2
V3 = IT_MESSAGES-MSGV3
V4 = IT_MESSAGES-MSGV4
IMPORTING
MSG = V_MSG
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
WRITE : / V_MSG.
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.
ENDLOOP.
IF FLAG NE 'X'.
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
NOT_OPEN = 1
QUEUE_ERROR = 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.
ENDIF.
Start new screen *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR IT_BDCDATA.
IT_BDCDATA-PROGRAM = PROGRAM.
IT_BDCDATA-DYNPRO = DYNPRO.
IT_BDCDATA-DYNBEGIN = 'X'.
APPEND IT_BDCDATA.
ENDFORM.
Insert field *
FORM BDC_FIELD USING FNAM FVAL.
CLEAR IT_BDCDATA.
IT_BDCDATA-FNAM = FNAM.
IT_BDCDATA-FVAL = FVAL.
APPEND IT_BDCDATA. -
How to insert more items for each tab in WAD 7.0
Hello to everyone,
My problem is confined to the WAD 7.0
I would like to insert 4 different queries into a new Web Template.
Two of them have to stay in one page and the others in one page each; therefore, the result would be a Web Template with three tabs.
Unfortunately the system creates automatically four different tabs with one query each.
Anybody knows how to insert more items in one page/tab?
Thank you very much
Savino PompaHi Savino
In the WAD bring up the properites of the tabstrip_container web item, under the Internal Display group in the Tab Panel List, create 3 tabs, then drag 3 contatiner_layout web items into the tab web item.
In each conatiner item drag the analysis web item, 2 in the first container, then 1 each for the others, then point each analysis web item at a dataprovider(query).
Setup the contatiners so that the analysis items displays, to do this in the container properties create a row then on the following screen a column and then set the Subordinate web item to the analysis item, these web items control layout and are useful for dealing with multiple web items, for the first tab with 2 queries you will need to play with the layout, either 1 row 2 column or 2 row 1 column.
For each tab you created add the corresponding contatiner as the Subordinate Web Item in the Tab Panel parameters for each tab.
Hope this helps
Josh
Maybe you are looking for
-
Hi I have developed a search servlet and deployed it in tomcat 4.0.3 and connected to mysql database through jdbc by specifying jndi. I have coded JNDI lokkup name as "java:comp/env/jdbc/KgoogleDB" I have added a context in server.xml file of tomcat
-
How to give colors to the top-of-page in ALV Grid
How to give colors to the top-of-page in ALV Grid in table GT_LIST_TOP_OF_PAGE i am filling 3 rows ,i need 3 different colors to be displyed on top-of-page(one color to one row) CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE' EXPORTING I_LOGO = 'ENJOYSAP_
-
Problems with photoshop psd files in Lightroom 2
I've been using Photoshop with raw and jpeg images for years, until just recently i started learning Lightroom 2 by watching the Kelby Training series online. I have learned a ton, but there are some things that i am just not able to figure out and f
-
Can I have two Web Galleries?
Simple question: Can I have two Web Galleries? (Not albums within one Gallery, but separate Galleries?)
-
OS X Mountain Lion Upgrade?
Is there any information on when the upgrade to OS X 10.8.3 will be made available?