Using Tabstrip update the database table
Hi Guy's,
I created two screens(100 & 110).
Click 1 pushbutton HRP1000 related information is displayed.
Click 2 pushbutton it displays HRP1001 relatd information.
worked to read the data from the Database tables and output displayed sucessfuly . However i want to entered data in those fields wants to update to database table.
Please friends help me how to work this senario.
Thanks and Regards,
Sai.
Hi Guy's,
To update the database records, wrote the logic in PAI
WHEN 'SAVE'.
INSERT HRP1001.
INSERT INTO HRP1001 VALUES wa_P2.
it displaying an error message " the work area wa_p2 is not long enough.
and also i tried using it_p2
it displaying an error message " you can't use internal table as work area".
Please help me friends it is very urgent.
Thanks and Regards,
Sai.
Similar Messages
-
Regardig error while updating the database table
hi experts,
i m trying to update the database table from the values containig in my internal table ,,,but the system is giving this error plz help me::::
The type of the database table and work area (or internal table)
"ITAB_UPDATE" are not Unicode convertible. Unicode convertible.
my internal table name itab_update and the database table name yitab.i m using this statement::
modify yitab from itab_update.Hi
1. You have to Declare the Itab with the same structure as DB table.
2. Use the statement
Modify <DBtable> from TABLE <itab>.
or
Update <DBtable> from TABLE <itab>.
Hope this will solve.
Reward .....if so.
Regards. -
Change the data in fieldcat and update the database table in alv oops
Hi,
my requirement is i have displayed a fieldcat in change mode and when i change the data and click on save it has to be updated the database table..
this has to be done using alv oops...Hi,
This code will reflect all the changes into the internal table that is being displayed.
* to reflect the data changed into internal table
DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.
IF NOT ref_grid IS INITIAL.
CALL METHOD ref_grid->check_changed_data.
ENDIF.
Now after this code is executed the internal table is modified as per the changes done in alv output.
Now you can use this internal table to update the database table.
Hope this helps you.
Regards,
Tarun -
Hi All,
i need to do direct update to the database table and the table has apprx 60,000 records . i am getting all records from database table to internal table and has to chnage the one of the field value and pass it to the database table . So i am looping the internal table and what is the best approach to update the database table is it to use UPDATE Pa0001 SET KOSTL = it_0001-KOSTL from table it_0001 each time in the loop to update each record and commit work which hits database for each record or use the statement UPDATE pa0001 from table it_0001 and if count = 1000 then COMMIT work in this way it will hit the database for every 1000 records . Appreciate your suggestions,
Thanks,
Latha.My Code to update PA0006 is :
DATA: t_pa0006 TYPE STANDARD TABLE OF pa0006 INITIAL SIZE 0,
wa_pa0006 LIKE LINE OF t_pa0006,
w_lin TYPE i.
FIELD-SYMBOLS: <fs_pa0006> LIKE LINE OF t_pa0006.
SELECT * FROM pa0006 INTO TABLE t_pa0006 WHERE uname = 'PKHAROR'.
LOOP AT t_pa0006 ASSIGNING <fs_pa0006>.
<fs_pa0006>-stras = 'My Street'.
ENDLOOP.
DESCRIBE TABLE t_pa0006 LINES w_lin.
UPDATE pa0006 FROM TABLE t_pa0006.
IF sy-subrc EQ 0.
COMMIT WORK.
WRITE:/ w_lin, ' Records have been updated..'.
ENDIF.
Reward points for useful answers
Regards
Pradeep
Regards
Pradeep -
Update the database table inside an user exit.
Hi Experts,
I have a issue where i have to update a custom table in an User exit.
I am using Lock object for ENQUE/DEQUE.
I have tried to use statements like UPDATE/MODIFY inside the user exit.
But the problem is that it's not updating the database table at the same time.
I know if i use COMMIT WORK it can update at the same time but it's not advisable to use COMMIT inside a work.and also it gives a short dump.
The real issue is that this custom table is read for batch creation at the same time for different users.
Now if it the program does not update the database table at the same time then other users also read the same data and create the same Batch number..
While requirement is to create a different/unique batch numbers.
Program is updating the table but it's taking time..so in between other users are creating the same batch number.
Please guide me what would be the best solution for this.
Regards,
Amit Kumar SinghThanks for your quick reply.
My actually requirement is like that.
I have to create a Process Order using tcode COR1.
After passing some input value it goes inside an User Exit.
There one Custom table is maintained which stores some fields like month,year,numeric key field,etc.
The new batch number is created using the combination of these table fields.
Once a new batch number is created it increment the numeric key field number by one.
Issue is we have to update this new numeric field value into the database field so that other users can read a diffrent numeric field value.hence it will create a new/different batch number.
Here i am not able to update the database table inside this User Exit.
Table is geeting updated but after some time and out of this User Exit.
Please suggest what's required in that case?
Regards,
Amit Kumar Singh
Edited by: Amit Singh on Feb 3, 2009 11:33 AM -
Rfc enabled function module for the updating the database table
Hi,
I need one rfc enabled function module for the updating the database table from the legacy system.currently i am using the rfc_read_table to read the database table.similarly i need for the update.Hi
I believe you need to create one by yourself
Max -
Field value is getting double while updating the database table
Hi Experts,
A simple doubt :
there is a standard program through which a zfunction module is getting triggered, through this zfunction module i am updating the database table.
Now what happening is one of the field(KCQTY) value in database is getting double at a time when i am executing the Program with same variant only.
I have also done the CLEAR & REFRESH internal tables starting of the Function module.
Can you please help me out.
Max points wil be awarded.
thanks
rico.Hi Nicole,
this is the part of the coding where you can see how the field KCQTY is getting moved in the loop statement.
DELETE IT_CE20002B_815 WHERE
KONDA = SPACE OR
WERKS = SPACE OR
VVB01001 < 0.
LOOP AT IT_CE20002B_815.
INDX = SY-TABIX.
CONCATENATE IT_CE20002B_815-PERBL0(4) IT_CE20002B_815-PERBL5(2)
INTO MONAT.
MOVE itab_ce20001b-perbl TO monat.
CLEAR S815.
READ TABLE IT_ZPL_MCS5 WITH KEY KONDA = IT_CE20002B_815-KONDA
BINARY SEARCH.
SELECT SINGLE * FROM S815 WHERE VRSIO = '000'
AND SPMON = MONAT
AND KONOB = 'APO'
AND MVGR2 = IT_CE20002B_815-KONDA
AND PRODH = IT_CE20002B_815-PRDHA
AND WERKS = IT_CE20002B_815-WERKS.
AND VTWEG EQ CO_VTWEG_99.
BREAK SAMEE.
IF SY-SUBRC EQ 0.
Eintrag in S810 existiert
IF S815-AEMENGE <= IT_CE20002B_815-VVB01001.
wenn die Auftragseingangsmenge kleiner gleich der Kontingentsmenge
wird die Kontingentmenge in das Steploop übernommen
MOVE IT_CE20002B_815-VVB01001 TO W_T_DATA_815-KCQTY.
*Liste ausgeben
PERFORM AUSGABE4.
PERFORM AUSGABE4_815.
ELSE.
Ausgabe Fehlermeldung, wenn die Auftragsmenge größer als die
Kontingentmenge ist.
*Liste mit fehlermeldungen ausgeben, Kontingent trotzdem übernehmen
MOVE IT_CE20002B_815-VVB01001 TO W_T_DATA_815-KCQTY.
PERFORM AUSGABE_FEHLER4.
PERFORM AUSGABE_FEHLER4_815.
delete it_ce20002b index indx.
continue.
ENDIF.
ELSE.
Es existiert kein Eintrag in S810, dann direkt eingeben
MOVE IT_CE20002B_815-VVB01001 TO W_T_DATA_815-KCQTY.
MODIFY IT_CE20002B_815 INDEX INDX.
*Liste ausgeben (Kein Eintrag in S810)
PERFORM EINTRAG2.
PERFORM EINTRAG2_815.
ENDIF.
*Übergabestructur für die Weiterverarbeitung durch das Copymanagement
*im Functionsbaustein wird gefüllt.
W_T_DATA_815-SPMON = MONAT. "itab_ce20001a-perbl.
W_T_DATA_815-KONOB = CO_KONOB_APO.
READ TABLE IT_ZPL_MCS5 WITH KEY KONDA = IT_CE20002B_815-KONDA
BINARY SEARCH.
IF SY-SUBRC EQ 0.
W_T_DATA_815-MVGR2 = CO_MVGR2_999.
ELSE.
W_T_DATA_815-MVGR2 = IT_CE20002B_815-KONDA.
ENDIF.
W_T_DATA_815-WERKS = IT_CE20002B_815-WERKS.
W_T_DATA_815-PRODH = IT_CE20002B_815-PRDHA.
W_T_DATA_815-VTWEG = '99'.
W_T_DATA_815-KUNNR = '9999999999'.
W_T_DATA_815-KCQTY = IT_CE20002B_815-VVB01001.
W_T_DATA_815-BASME = IT_CE20002B_815-VVB01_ME.
JR181005 - begin of ins.
w_t_data_810-matkl = it_ce20002b-matkl.
JR181005 - end of ins.
APPEND W_T_DATA_815 TO TAB_DATA.
CLEAR IT_CE20002B_815.
ENDLOOP.
thanks for reply
rico -
FM or BAPI to update the database table /TDAG/CPT_DEC_IN
Hi All,
I need to update a few entries in the database table /TDAG/CPT_DEC_IN (CP: Declarable Substances, Independent attributes). This table contains data for the EHS ( Environment, Health and Safety) Module in SAP.
Instead of doing a direct database update, I needed a FM or a BAPI to update the same.
Any pointers towards this will be really useful.
Thanks and Regards,
Arti DohareHi Raymond,
Thanks for the reply. it seems I was using the wrong BAPI then.
I actually created the network using the BAPI "BAPI_BUS2002_CREATE".
This BAPI does not have the field call "Resp. cost cntr" in its input parameters and so I could not pass it there. Now I am trying to find if there is any standard FM or BAPI to maintain this field in the networks.
I request you to please suggest some FM or BAPI if you know.
Thanks and Regards.
Piyush R Sakharkar. -
Update the database table with the content of the internal table
Hello!
I have the next form:
FORM erase_data.
SELECT * FROM zadrress INTO CORRESPONDING FIELDS OF TABLE itab_adrress.
DELETE TABLE itab_adrress: FROM zadrress,
WITH TABLE KEY adrid = '456'.
WRITE 'The information after the DELETE operation'
COLOR 2.
LOOP AT itab_adrress INTO wa_adrress .
WRITE:/
wa_adrress-adrid COLOR 5,
wa_adrress-name COLOR 7,
wa_adrress-email COLOR 5,
wa_adrress-depart COLOR 7,
wa_adrress-display COLOR 5.
ENDLOOP.
SKIP.
LOOP AT itab_adrress INTO wa_adrress.
MODIFY zadrress FROM wa_adrress.
COMMIT WORK.
IF sy-subrc = 0.
WRITE 'OK !'.
SKIP.
ELSE.
WRITE 'FAIL !'.
SKIP.
ENDIF.
ENDLOOP.
MODIFY zadrress FROM TABLE itab_adrress.
UPDATE zadrress FROM TABLE itab_adrress.
TRANSPORTING adrid, name, email, depart, display.
INSERT zadrress FROM TABLE itab_adrress ACCEPTING DUPLICATE KEYS.
PERFORM display_data .
ENDFORM. "erase_data
I see that my record is deleted when I display the records from my internal table, but
now I want to delete the record from database table.
For that I want to move the content of the modified internal table in the database table. You can see the methods I tried (some of them commented), but nothing seems to work.
Any advice ?
Thank you.FORM erase_data.
SELECT * FROM zadrress INTO CORRESPONDING FIELDS OF TABLE itab_adrress.
DELETE TABLE itab_adrress: FROM zadrress,
WITH TABLE KEY adrid = '456'.
WRITE 'The information after the DELETE operation'
COLOR 2.
LOOP AT itab_adrress INTO wa_adrress .
WRITE:/
wa_adrress-adrid COLOR 5,
wa_adrress-name COLOR 7,
wa_adrress-email COLOR 5,
wa_adrress-depart COLOR 7,
wa_adrress-display COLOR 5.
ENDLOOP.
SKIP.
LOOP AT itab_adrress INTO wa_adrress.
MODIFY zadrress FROM wa_adrress.
COMMIT WORK.
IF sy-subrc = 0.
WRITE 'OK !'.
SKIP.
ELSE.
WRITE 'FAIL !'.
SKIP.
ENDIF.
ENDLOOP.
<b>DELETE FROM zadrress.</b> "Make this change and try
MODIFY zadrress FROM TABLE itab_adrress.
UPDATE zadrress FROM TABLE itab_adrress.
TRANSPORTING adrid, name, email, depart, display.
INSERT zadrress FROM TABLE itab_adrress ACCEPTING DUPLICATE KEYS.
PERFORM display_data .
ENDFORM. "erase_data'. -
How to update the database table using webdynpro??
Hi,
Can anybody helm me in updating database table....by entering the values on the output screen of webdynpro component??should i use any commit statement in function module ,which i used to update.hi martina....
consider you are having two input fields bound to attr1 and attr2.
now after pressing the save button:
just read teh two attributes to field1, field2 using code wizard. then
<db name>-<fieldname1> = <field1>.
<db name>-<fieldname2> = <field2>.
insert <dbname>.
---regards,
alex b justin -
ERROR IN FILE--XI--RFC SCENARIO. BAPI did not UPDATE the DATABASE TABLE
Hi
I have created a scenario FILE -XI- RFC
File is picked by file adapter - Its working fine
I have used BPM
In RFC side i used BAPI_INCOMINGINVOICE_CREATE
Its working fine and return an Invoice Number and Fisical year .
When i Check this in the R/3 System , in Invoice no Does not Exist .
Message mapping is ok
SXMB_MONI all are ok
Receiver file i got the invoice no and fisical year .
The Problem is " DATABASE TABLE DID NOT UPDATED "
So should i do BAPI_COMMIT seperately ........
Any solution ................
VERY VERY URGENT .....
thanks in advance
B.Judehi jude,
Commit Control for Single BAPI Calls
If you want to use this communication channel to call BAPIs as remote-enabled function modules that change data in the database, set the indicator.
If executed successfully, the transaction is written to the database by calling the function module BAPI_TRANSACTION_COMMIT explicitly. If an error occurs, the transaction is rolled back by BAPI_TRANSACTION_ROLLBACK.
The result is determined by the value of the field TYPE in parameter RETURN. If successful, the tables are empty and the values , S, I, and W are displayed. All other values are regarded as errors.
To change this setting, set the indicator BAPI Advanced Mode.
<b>In the Successful RETURN-TYPE Values table, enter the values that should lead to a successful execution.</b>
Regards,
Mandeep Virk -
How to track personal details changes in the report without using triggers on the database tables
Hi There,
I'm having a requirement to track the oracle HRMS Personal details changes in the report not using the triggers.
ex: if some changes the address of the person, then that changed values should be populated in the report.
Please find below query:
If any of the following columns data is updated, the new value should be populated in the report.
SELECT PAPF.PERSON_ID PAPF_PERSON_ID
, PAPF.EMPLOYEE_NUMBER EMPLOYEE_NUMBER
, PAPF.FIRST_NAME FIRST_NAME
, PAPF.LAST_NAME LAST_NAME
, TO_CHAR(PAPF.DATE_OF_BIRTH ,'DD-MON-YYYY') DATE_OF_BIRTH
, ADDR.ADDRESS_LINE1 ADDRESS_1
, ADDR.ADDRESS_LINE2 ADDRESS_2
, ADDR.ADDRESS_LINE3 ADDRESS_3
, ADDR.TOWN_OR_CITY TOWN
, ADDR.REGION_1 COUNTY
, ADDR.POSTAL_CODE POST_CODE
, ADDR.COUNTRY COUNTRY
, PAY.PAYROLL_NAME PAYROLL_NAME
, PLN_TYP.NAME PLAN_TYP
, PLN.NAME PRODUCT_NAME
, BOF.NAME COVERAGE
FROM PER_ALL_PEOPLE_F PAPF
, PER_ALL_ASSIGNMENTS_F PAF
, PER_ADDRESSES ADDR
, PAY_PAYROLLS_F PAY
, BEN_PRTT_ENRT_RSLT_F PEN
, BEN_PL_TYP_F PLN_TYP
, BEN_PL_F PLN
, BEN_OIPL_F BOIPF
, BEN_OPT_F BOF
WHERE 1 = 1
AND PAPF.PERSON_ID = PAF.PERSON_ID
AND TRUNC(SYSDATE) BETWEEN PAPF.EFFECTIVE_START_DATE AND PAPF.EFFECTIVE_END_DATE
AND TRUNC(SYSDATE) BETWEEN PAF.EFFECTIVE_START_DATE AND PAF.EFFECTIVE_END_DATE
AND PAPF.PERSON_ID = ADDR.PERSON_ID
AND ADDR.PRIMARY_FLAG = 'Y'
AND ADDR.DATE_TO IS NULL
AND PAF.PAYROLL_ID = PAY.PAYROLL_ID(+)
AND PEN.PERSON_ID = PAPF.PERSON_ID
AND PEN.BUSINESS_GROUP_ID = PAPF.BUSINESS_GROUP_ID
AND TRUNC(SYSDATE) BETWEEN TRUNC(PEN.EFFECTIVE_START_DATE) AND TRUNC(PEN.EFFECTIVE_END_DATE)
AND PEN.PRTT_ENRT_RSLT_STAT_CD IS NULL
AND PEN.SSPNDD_FLAG = 'N'
AND ( PEN.ENRT_CVG_THRU_DT >= TRUNC(SYSDATE)
OR PEN.ENRT_OVRIDN_FLAG = 'Y')
AND EXISTS(SELECT PIL.PER_IN_LER_ID
FROM BEN_PER_IN_LER PIL
WHERE PIL.PER_IN_LER_ID = PEN.PER_IN_LER_ID
AND PIL.BUSINESS_GROUP_ID = PEN.BUSINESS_GROUP_ID
AND PIL.PER_IN_LER_STAT_CD NOT IN ('VOIDD','BCKDT'))
AND PEN.PL_TYP_ID = PLN_TYP.PL_TYP_ID
AND TRUNC(SYSDATE) BETWEEN PLN_TYP.EFFECTIVE_START_DATE AND PLN_TYP.EFFECTIVE_END_DATE
AND PLN_TYP.PL_TYP_ID = PLN.PL_TYP_ID
AND TRUNC(SYSDATE) BETWEEN PLN.EFFECTIVE_START_DATE AND PLN.EFFECTIVE_END_DATE
AND PLN.PL_ID = PEN.PL_ID
AND PEN.OIPL_ID = BOIPF.OIPL_ID(+)
AND TRUNC(SYSDATE) BETWEEN NVL(BOIPF.EFFECTIVE_START_DATE,HR_GENERAL.START_OF_TIME) AND NVL(BOIPF.EFFECTIVE_END_DATE,HR_GENERAL.END_OF_TIME)
AND BOIPF.OPT_ID = BOF.OPT_ID(+)
AND TRUNC(SYSDATE) BETWEEN NVL(BOF.EFFECTIVE_START_DATE,HR_GENERAL.START_OF_TIME) AND NVL(BOF.EFFECTIVE_END_DATE,HR_GENERAL.END_OF_TIME)
AND (:P_SYSDATE) BETWEEN TRUNC(PEN.ENRT_CVG_STRT_DT) AND TRUNC(PEN.ENRT_CVG_THRU_DT)
AND (CASE WHEN :P_PAYROLL_ID IS NULL THEN 'Y' ELSE NVL((SELECT 'Y' FROM DUAL WHERE PAY.PAYROLL_ID = :P_PAYROLL_ID), 'N') END) = 'Y'
AND PAPF.LAST_UPDATE_DATE = (:P_SYSDATE) ;
--AND PAPF.LAST_UPDATE_DATE BETWEEN to_date(:P_SYSDATE) and (to_date(:p_sysdate) + INTERVAL '31' Day);
--AND (:P_SYSDATE) = PAPF.LAST_UPDATE_DATE ;
Thankscheck this -
Re: Best Event-Based notifications for Sox Complience? -
Hi,
I'm a fresher n facin a problem while workin with table control...I have created a screen in which i'm passing the sales order and its corresponding invoice number,as a result the data related to that particular invoice number is getting fetched in a table control..Three fields are getting fetched namely text,value and text1.These fields are getting fetched by a ztable that i have created.Now i want to edit the contents being fetched and for that particular invoice number the ztable should be gettin updated for whatever changes i have done to the fetched fields.. text is a primary key in my ztable..
Please try to guide me through this problem..Hi,
I think u need to change the structure of ur z-table. 'Text' cannot be ur primary key. Maybe it should be ur invoice numbar' otherwise the data u r storing in the table will be inconsistant.
Regs,
Saurabh -
Problem while updating a database table
Hi experts,
I've used the FM 'HR_INFOTYPE_OPERATION' to update the database table. In that i used the MOD operation to update the Infotype PA0315. But it return an error message like "Infotype does not exist". What could be the reason for this error?.
regards,
Shanthi.Hi,
Here is my code for updation.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = P0315-pernr
IMPORTING
RETURN = wf_returne.
Update Mode
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0315'
NUMBER = P0315-PERNR
SUBTYPE = P0315-SUBTY
OBJECTID = P0315-OBJPS
LOCKINDICATOR = P0315-SPRPS
VALIDITYEND = P0315-ENDDA
VALIDITYBEGIN = P0315-BEGDA
RECORDNUMBER = P0315-SEQNR
RECORD = P0315
OPERATION = 'MOD'
TCLAS = 'A'
DIALOG_MODE = '0'
IMPORTING
RETURN = wf_return.
Dequeue
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
NUMBER = P0315-PERNR. -
Regarding updating of database table..
Halo All,
I have actually done the program successfully for updating the database table QMFE some days back, now we needed to update some more records and i have just changed the path of the text files but the problem is that all the values are being uploaded but the update statement is not executing successfully
I have also tried to debug the program and saw that the sy-subrc value is 4 instead of 0.
I am pasting my code here.
Please solve this asap.
*& Report Y_UPDATE_QMFE_01 *
*& Program Y_UPDATE_QMFE_01 *
*& Author RAMA KRISHNA BASA *
*& Date 02-04-2007 *
*& Description REPORT FOR Update of Table QMFE *
*& Includes *
*& Tables QMFE *
*& Program Maintenance History *
*& Date Author Change Request Number SAP Release *
*& 02-04-2007 BASA EF7K919575 6.10 *
REPORT Y_UPDATE_QMFE .
Tables: qmfe.
data: begin of gt1_qmfe occurs 0,
qmnum like qmfe-qmnum,
fenum like qmfe-fenum,
/itml/usr20 like qmfe-/itml/usr20,
end of gt1_qmfe.
data: begin of gt2_qmfe occurs 0,
qmnum like qmfe-qmnum,
fenum like qmfe-fenum,
/itml/usr21 like qmfe-/itml/usr21,
end of gt2_qmfe.
data: begin of gt3_qmfe occurs 0,
qmnum like qmfe-qmnum,
fenum like qmfe-fenum,
/itml/usr19 like qmfe-/itml/usr19,
end of gt3_qmfe.
data: begin of gt4_qmfe occurs 0,
qmnum like qmfe-qmnum,
fenum like qmfe-fenum,
/itml/usr07 like qmfe-/itml/usr07,
end of gt4_qmfe.
data: gs1_qmfe like line of gt1_qmfe,
gs2_qmfe like line of gt2_qmfe,
gs3_qmfe like line of gt3_qmfe,
gs4_qmfe like line of gt4_qmfe.
data: ls_lines1 type i,
ls_lines2 type i,
ls_lines3 type i,
ls_lines4 type i.
parameters: ip_file1 type RLGRAP-FILENAME default 'C:\Urgent\New\Text Files\StoDt.txt' obligatory, " usr20
ip_file2 type RLGRAP-FILENAME default 'C:\Urgent\New\Text Files\RcDtCust.txt' obligatory, " usr21
ip_file3 type RLGRAP-FILENAME default 'C:\Urgent\New\Text Files\DockDate.txt' obligatory, " usr19
ip_file4 type RLGRAP-FILENAME default 'C:\Urgent\New\Text Files\AWB.txt' obligatory. " usr07
field-symbols: <fs1> like gs1_qmfe,
<fs2> like gs2_qmfe,
<fs3> like gs3_qmfe,
<fs4> like gs4_qmfe.
perform upload_gt1_qmfe.
perform upload_gt2_qmfe.
perform upload_gt3_qmfe.
perform upload_gt4_qmfe.
perform update_qmfe.
*& Form upload_gt1_qmfe
text
--> p1 text
<-- p2 text
FORM upload_gt1_qmfe .
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = ip_file1
FILETYPE = 'DAT'
TABLES
DATA_TAB = gt1_qmfe.
describe table gt1_qmfe lines ls_lines1.
write: / ls_lines1.
ENDFORM. " upload_gt1_qmfe
*& Form upload_gt2_qmfe
text
--> p1 text
<-- p2 text
FORM upload_gt2_qmfe .
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = ip_file2
FILETYPE = 'DAT'
TABLES
DATA_TAB = gt2_qmfe.
describe table gt2_qmfe lines ls_lines2.
write: / ls_lines2.
ENDFORM. " upload_gt2_qmfe
*& Form upload_gt3_qmfe
text
--> p1 text
<-- p2 text
FORM upload_gt3_qmfe .
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = ip_file3
FILETYPE = 'DAT'
TABLES
DATA_TAB = gt3_qmfe.
describe table gt3_qmfe lines ls_lines3.
write: / ls_lines3.
ENDFORM. " upload_gt3_qmfe
*& Form upload_gt4_qmfe
text
--> p1 text
<-- p2 text
FORM upload_gt4_qmfe .
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = ip_file4
FILETYPE = 'DAT'
TABLES
DATA_TAB = gt4_qmfe.
describe table gt4_qmfe lines ls_lines4.
write: / ls_lines4.
ENDFORM. " upload_gt4_qmfe
*& Form update_qmfe
text
--> p1 text
<-- p2 text
FORM update_qmfe .
data: ls_cnt1 type i,
ls_cnt2 type i,
ls_cnt3 type i,
ls_cnt4 type i.
*refresh gt1_qmfe.
*clear gt1_qmfe.
loop at gt1_qmfe assigning <fs1> .
*concatenate <fs1>-/itml/usr206(2) '.' <fs1>-/itml/usr204(2) '.' <fs1>-/itml/usr20+2(2) into <fs1>-/itml/usr20.
data wa_qmfe type qmfe.
*select single * from qmfe into wa_qmfe where qmnum = <fs1>-qmnum
and fenum = <fs1>-fenum.
*wa_qmfe-/itml/usr20 = <fs1>-/itml/usr20.
update QMFE set /itml/usr20 = <fs1>-/itml/usr20
where qmnum = <fs1>-qmnum
and fenum = <fs1>-fenum.
*modify qmfe from wa_qmfe.
if sy-subrc = 0.
commit work.
add 1 to ls_cnt1.
endif.
endloop.
write: / ls_cnt1.
*refresh gt2_qmfe.
*clear gt2_qmfe.
loop at gt2_qmfe assigning <fs2>.
*concatenate <fs2>-/itml/usr216(2) '.' <fs2>-/itml/usr214(2) '.' <fs2>-/itml/usr21+2(2) into <fs2>-/itml/usr21.
update qmfe set /itml/usr21 = <fs2>-/itml/usr21
where qmnum = <fs2>-qmnum
and fenum = <fs2>-fenum.
if sy-subrc = 0.
commit work.
add 1 to ls_cnt2.
endif.
endloop.
write: / ls_cnt2.
*refresh gt3_qmfe.
*clear gt3_qmfe.
loop at gt3_qmfe assigning <fs3>.
*concatenate <fs3>-/itml/usr196(2) '.' <fs3>-/itml/usr194(2) '.' <fs3>-/itml/usr19+2(2) into <fs3>-/itml/usr19.
update qmfe set /itml/usr19 = <fs3>-/itml/usr19
where qmnum = <fs3>-qmnum
and fenum = <fs3>-fenum.
if sy-subrc = 0.
commit work.
add 1 to ls_cnt3.
endif.
endloop.
*top_of_page.
write: / ls_cnt3.
*refresh gt4_qmfe.
*clear gt4_qmfe.
loop at gt4_qmfe assigning <fs4>.
update qmfe set /itml/usr07 = <fs4>-/itml/usr07
where qmnum = <fs4>-qmnum
and fenum = <fs4>-fenum.
if sy-subrc = 0.
commit work.
add 1 to ls_cnt4.
endif.
endloop.
write: / ls_cnt4.
ENDFORM. " update_qmfe
Thanks in advance,
rama.Hi,
Thanks for the reply..
But last time the update was successfull and the program was transported onto the productive system
after that now i need to update the new records into QMFE
so what i did is just changed the path of the text files since they are of same format as of the old text files.
Does it have any problems.
How can i do that using what u have suggested......
i need to update the database table QMFE
is there any bapi to update the data base table
Maybe you are looking for
-
Reg the selection screen value request
i am writing this code for getting corresponding material no for the plant which i giving in the selection-screen . parameter : WERKS type marc-werks, matnr type marc-matnr. data : begin of itab occurs 0, matnr like marc-matnr,
-
How to create views in OBIEE?
Hi everyone, I'm new to OBIEE. My requirement is i need to apply different filters to each columns in a report. But if i apply any filter it is applying to all the columns. For example, My report column is something like StudentsPassed || StudentsFai
-
So i have setup iCal server in an open directory environment. Its running ok, and i can manage and use individual user calendars, but the group calendars are not showing up in iCal on the client machine im using for testing. In this scenario i have a
-
How to Collect IDOCS before sending to 3rd party
Hi All, I am sending out PO's using ORDERS idoc from SAP to 3rd party. In my scenario I need to group the similar IDOC data into a single file before sending it out to the 3rd party using XI. So in Partner profile I have choosen 'Collect IDOC' option
-
Does anyone know if OVM what kind of security level it has approved?
HI, I am interested to know where do I find, what kind of approvals are OVM approved to be use for (i.e.: government-approved), does anyone know where do I find that information? Please advise. Or where I can find what are the security or standa