OSB DB Poller deleting the record when there is a failure
Hi All,
My project consists of below OSB services..
DB Poller -> Proxy service A -> Proxy service B
DB Poller is JCA Based and it should delete the polled record after the complete flow is successful. If there is any error in my OSB Proxy services, the record should not be deleted.
Proxy service A calls Proxy service B using routing(static). My Proxy service B is throwing error and the record is getting deleted.
If I change to Dynamic routing the record id not getting deleted and the flow works as expected. The routing option configuration is same for both static and dynamic routing.
The only configuration in my routing option is QOS="Exactly once" .
Can anyone let me know why the record is deleted if I use static routing?
Thanks in advance
In your scenario record will be deleted as your DB Poller will commit the transaction once the message has been delivered to Proxy Service A.
If you want the message not to be deleted then you must have only the DB Poller proxy include the logic of proxy A and must make a call to proxy B.
Similar Messages
-
Hi,
How can i find the user who deleted the record when auditing is not enabled in the database?Perhaps something like this should work ->
select a.sid,
a.serial#,
a.username,
a.ownerid,
b.sql_text,
a.status,
a.schemaname,
a.osuser,
a.process,
a.machine,
a.terminal,
a.program,
a.type,
a.module,
a.logon_time,
a.event,
a.service_name
from (
select sid,
serial#,
username,
ownerid,
status,
schemaname,
osuser,
process,
machine,
terminal,
program,
type,
module,
logon_time,
event,
service_name,
sql_id
from v$session as of timestamp(sysdate - 1/1440) -- 60/1440 indicates 1 hour before
) a,
select sql_text,
sql_id
from (select * from v$sqltext as of timestamp(sysdate - 1/1440))
where sql_text like '%delete from emp_n%'
) b
where a.sql_id = b.sql_id
and a.schemaname = upper('scott');I personally felt that - if you are DBA then you should blame it on yourself and not to any other developer. After all, this is your mistake - no matter the developer has done it intentionally or not. It's up to you people to maintain a proper security and not by them. And, you should take responsibility. Anyway, it's your matter. And, this is my opinion.
Regards.
Satyaki De. -
How do I delete a photo when there is not a trash bin at the bottom of the screen
How do I delete a photo when there is no trash bin on the bottom of the screen?
If there is no Trash icon for that photo, the photo was most likely copied to your iPhone by syncing with your computer. To delete the photo you need to do another sync.
1. If you want to remove a complete album, deselect that album in iTunes on your computer. Then when you click on Sync or Apply that album will be removed from your iPhone but it will remain on your computer.
2. If you want to remove only certain photos from albums you must delete the photo from the album on your computer or move it to a different album or folder. Then when you click on Sync or Apply the photo(s) will be removed from your iPhone. -
How to delete the record in Table
Hi Guru's,
i have Table which contain no.of Records.
i want to deleted one record. if i go to Table maint.Generator....from table itself..
how to do that... when we deleting the record. can we create new TR for that?
can anybody tell me.
Thanks in Advance,
venkatHi,
it is answered, here for my table there is no Table Maint.Generator.
i just explained how i have done it.
i just simply gone into Debug mode. there
code = Dele.
i have given. then i came out from debug mode to Table. there i just got Delete button on application tool bar.
i selected the record then icliked on Delete button.
it is got deleted.
But it is not asking for any new Transport Request.
Regards,
Venkat -
Can't delete master record when matching when matching detail record exist
Hi
on the rel. property:
Delete Record Behaviour = cascading
Prevent masterless Operation =yes
Automatic Query = yesCan't delete Record Master & Detail...
On delete getting error msg.
Can't delete master record when matching when matching detail record exist
am i missing something...!
Regards,
Abdetu...First of all, remember the ripple affect of cascading deletes and updates.
Oracle database allows creating master/detail relationship between tables using foreign keys and allows cascading deletes by defining the FOREIGN KEY constraint with ON DELETE CASCADE clause.
Oracle Forms on the other hand, handle cascade delete thing internally when you set the relation properties.
Now if you have 3 tables with MASTER->DETAIL1->DETAIL2 relationship and you have a form defined with MASTER->DETAIL1 relationship only, it won't let you delete (and save) master or detail record since the third table (DETAIL2) is referencing the rows from DETAIL1 which you are trying to delete.
If DETAIL2 were present on the form, it would have deleted with relation property CASCADING. If you really want that when you delete a master record, all its details should be deleted too, then consider defining FOREIGN KEY constraints with ON DELETE CASCADE and on the form set relation property CASCADING.
And if all master/detail tables are on your form and still it is not allowing you to delete master with cascading, there must be some code preventing it. Check triggers like ON-DELETE, KEY-COMMIT etc what they are doing. -
Vertical scrollbar not showing all the records when I scroll down.
Vertical scrollbar not showing all the records when I scroll down.
Using Oracle forms 10g , operating system windows
I have two fields with number of items dispayed = 15.
I have a vertical scroll bar with them. There are 34 records in the table but the scrollbar only shows 15 records.
Here are the properties for block / scrollbar.
WORK_CATEGORY
- Subclass Information
- Comments
* Navigation Style Same Record
- Previous Navigation Data Block
- Next Navigation Data Block
- Current Record Visual Attribute Group
- Query Array Size 0
- Number of Records Buffered 0
* Number of Records Displayed 60
* Query All Records No
- Record Orientation Vertical
* Single Record No
- Database Data Block Yes
- Enforce Primary Key No
- Query Allowed Yes
- Query Data Source Type Table
* Query Data Source Name WORK_CATEGORY
* Query Data Source Columns
* Column Name JOB_TYPE
* Column Type VARCHAR2
- Column Type Name
- Parent Column
* Length 30
* Precision 0
* Scale 0
* Mandatory Yes
* Column Name WORK_CATEGORY
* Column Type VARCHAR2
- Column Type Name
- Parent Column
* Length 30
* Precision 0
* Scale 0
* Mandatory Yes
- Query Data Source Arguments
- Alias
- Include REF Item No
* WHERE Clause
* ORDER BY Clause job_type
- Optimizer Hint
- Insert Allowed Yes
- Update Allowed Yes
- Locking Mode Automatic
- Delete Allowed Yes
- Key Mode Automatic
- Update Changed Columns Only No
- Enforce Column Security No
- Maximum Query Time 0
* Maximum Records Fetched 0
- DML Data Target Type Table
- DML Data Target Name
- Insert Procedure Name
- Insert Procedure Result Set Columns
- Insert Procedure Arguments
- Update Procedure Name
- Update Procedure Result Set Columns
- Update Procedure Arguments
Don't know where am I going wrong. I'll really appreciate if you can help me in this.
Thanks.
Edited by: 831050 on Sep 14, 2011 8:05 AMOne of the items is a list item.. here are it's properties:
* Name JOB_TYPE
* Item Type List Item
- Subclass Information
- Comments
- Help Book Topic
- Enabled Yes
* Elements in List
* Label
* List Item Value LIST20
* List Style Combo Box
- Mapping of Other Values
- Implementation Class
- Case Restriction Mixed
- Popup Menu
- Keyboard Navigable Yes
- Mouse Navigate Yes
- Previous Navigation Item
- Next Navigation Item
- Data Type Char
- Data Length Semantics Null
- Maximum Length 30
- Initial Value
* Required Yes
* Copy Value from Item
- Synchronize with Item
- Calculation Mode None
- Formula
- Summary Function None
- Summarized Block
- Summarized Item
- Current Record Visual Attribute Group
- Distance Between Records 0
* Number of Items Displayed 15
- Database Item Yes
* Column Name JOB_TYPE
- Primary Key No
- Query Only No
- Query Allowed Yes
- Insert Allowed Yes
- Update Allowed Yes
- Update Only if NULL No
- Visible Yes
* Canvas CANVAS2
- Tab Page
* X Position 47
* Y Position 137
* Width 187
* Height 18
- Visual Attribute Group DEFAULT
- Prompt Visual Attribute Group DEFAULT
- Foreground Color
* Background Color white
- Fill Pattern
- Font
* Font Name Tahoma
* Font Size 10
* Font Weight Demilight
* Font Style Plain
* Font Spacing Normal
* Prompt Job Type
- Prompt Display Style First Record
* Prompt Justification Start
* Prompt Attachment Edge Top
- Prompt Alignment Start
* Prompt Attachment Offset 10
* Prompt Alignment Offset 0
- Prompt Reading Order Default
- Prompt Foreground Color
- Prompt Font
* Prompt Font Name Tahoma
* Prompt Font Size 10
* Prompt Font Weight Bold
* Prompt Font Style Plain
* Prompt Font Spacing Normal
- Hint
- Display Hint Automatically No
- Tooltip
- Tooltip Visual Attribute Group
- Direction Default
- Initial Keyboard State Default
- Keyboard State Any
-
How to delete the record in the file present in the application server?
Hi,
I have two questions.
i) How can I delete a record based on some condition in the recordx in the file that is present in the application server?
ii) How can I lock the users whiel one user is accessing the file on the application server?
Thanks in advance.
SuvanHi,
If u want a frequent deletion this approach to delete a record from a file will havee unnecesary copy of records from one file to another and deletion of one file and renaming activities.
Instead what u can do is Add and field del_flag to ur record structure.
If u want to delete the record from a file just mark this del_flag as 'X'.
While processing u can have a loop like
loop at it_XXX where del_flag <> 'X'.
endloop.
This will logically delete the record.
When u r to finish the application at that time only perform this copying / deleting / and renaing activity
Hope this helps.
Cheers,
Nitin -
HOW to delete the records in CO1P?
Hi all:
When i close the PO,i find the PO have CO1P records.However ,the PO has been settled. Then how can i delete the records in CO1P for this PO.Dear,
CO1P:
Normally the Goods Movement errors are updated in Table AFFW - Goods Movements with Errors from Confirmations and in transaction COGI.
If the table is locked during background using update control for the confirmation then the errors are recorded in CO1P.
COFC:
Used for Reprocessing of errors in confirmation related to actual cost calculations.
Please run CORUPROC Program.
Please check this link also for further help
http://help.sap.com/saphelp_46c/helpdata/en/e3/7cd32396f611d1b5a60000e8359890/frameset.htm
Regards,
R.Brahmankar -
How to refresh after delete the records in ALV report ?
Hi Friends,
How to refresh after delete the records in ALV report.
I am deleting records in ALV report .
After successful delete the screen should refresh.
u201C Deleted records should not appear in the screen u201C.
Please guide me.
Regards,
SubashHi subhash,
FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.
WHEN 'BACK'.
Refresh the internal table from the ALV grid
PERFORM update_alv_tab.
ENDFORM. "user_command
FORM update_alv_tab .
DATA : e_grid TYPE REF TO cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = e_grid.
CALL METHOD e_grid->check_changed_data.
"update_alv_tab
CALL METHOD e_grid->refresh_table_display.
ENDFORM. " UPDATE_ALV_TAB
Then see in Debug mode is it updating or not..
Please confirm .
And please paste the code if you can.
Regards. -
How to delete the record of saved HRA Details...
Hi Experts,
I have put the details of HRA Correctly.But while updating HRA In 0008 Infotype i wrongly updated the wagetype,How should i change the Wagetype.
When i m trying to delete it is showing RECORD CAN NOT BE DELETED (TIME CONSTRAINT 1).
How can delete the record.
Thanking u .
SaiHi
Hope doing well ........ No need to delete any infotype but u can go to PA30 and in change mode their u can delete the wagetype which is wrongly entered
Rajeshk -
Sending email after deleting the records in a table
Hi
I am deleting the records in a table. After deleting the records,
i want to send an email to another person. I am planning to follow this steps.
1. Create a trigger on the table(AFTER DELETE ON table FOR EACH ROW)
to copy the deleted records to temporary table.
2. Read the temporary table and send an email.
Is there any other way we can do with out creating temporary table ?.
GovindI don't know what you plan to use to send the mail but here's a solution that would work.
-- Create a send mail procedure
create or replace procedure send_mail (
sender IN VARCHAR2,
recipient IN VARCHAR2,
message IN VARCHAR2)
IS
mailhost VARCHAR2(30) := 'localhost';
mail_conn utl_smtp.connection;
BEGIN
mail_conn := utl_smtp.open_connection(mailhost, 25);
utl_smtp.helo(mail_conn, mailhost);
utl_smtp.mail(mail_conn, sender);
utl_smtp.rcpt(mail_conn, recipient);
utl_smtp.data(mail_conn, message);
utl_smtp.quit(mail_conn);
END;
/-- Create the trigger to email deleted rows
create or replace trigger email_del_rows
after delete on <table>
for each row
declare
msg varchar2(2000);
begin
msg := 'COL1 COL2 COMPANY NAME DATE'||chr(10);
msg := msg||:old.col1||' '||:old.col2||' '||:old.company_name||' '||:old_date|| chr(10);
msg := msg||'END OF FILE';
send_mail('SENDER','[email protected]',msg);
end;
/You can make it look pretty but you get the basic idea. -
How to delete the records with routine Z_AFRP4_DELETE as note [418584|
Hello Gurus,
I don't want to transfer data into HR and want to delete the records in table AFRP4 to business complete the Maintenance Orders
Component version- EHP7 for SAP ERP 6.0
Component-EA-APPL
Release-617
how can I delete these records
Thanks fro Help
AMHello All,
I found the solution, I copied the code in correction instruction number 0000282352 and create the report as programme Z_AFRP4_DELETEand the executed
*$*$----------------------------------------------------------------$*$*
*$ Correction Inst. 0120061532 0000282352 $*
*$--------------------------------------------------------------------$*
*$ Valid for : $*
*$ Software Component SAP_APPL SAP Application $*
*$ Release 40B All Support Package Levels $*
*$ Release 45B All Support Package Levels $*
*$ Release 46B All Support Package Levels $*
*$ Release 46C All Support Package Levels $*
*$ Release 470 All Support Package Levels $*
*$ Release 500 All Support Package Levels $*
*$ Release 600 All Support Package Levels $*
*$ Release 602 All Support Package Levels $*
*$ Release 603 All Support Package Levels $*
*$ Release 604 All Support Package Levels $*
*$ Release 605 All Support Package Levels $*
*$ Release 606 All Support Package Levels $*
*$--------------------------------------------------------------------$*
*$ Changes/Objects Not Contained in Standard SAP System $*
*$*$----------------------------------------------------------------$*$*
*& Object REPS Z_AFRP4_DELETE
*& Object Header PROG Z_AFRP4_DELETE
*& REPORT Z_AFRP4_DELETE
REPORT Z_AFRP4_DELETE .
* This report deletes confirmation records from table AFRP4 that are
* not longer needed. Run it without update flag first !!
tables: afrp4.
data: lt_afrp4 like afrp4 occurs 0,
ls_afrp4 like afrp4.
selection-screen begin of block order with frame.
select-options: zorders for afrp4-aufnr. "order number
selection-screen end of block order.
parameters: update as checkbox.
select * from afrp4 into table lt_afrp4
where aufnr in zorders.
if lt_afrp4[] is initial.
format color col_normal.
write: 'No HR confirmation background records read.'.
exit.
endif.
format color col_heading.
write: /5 'Order', 25 'Confirmation', 45 'Counter'.
skip. uline. skip.
* show corrections
loop at lt_afrp4 into ls_afrp4.
format color col_normal.
write: /5 ls_afrp4-aufnr, 25 ls_afrp4-rueck, 45 ls_afrp4-rmzhl.
endloop.
* update on data base table
if not update is initial.
skip. uline. skip.
delete afrp4 from table lt_afrp4.
if sy-subrc is initial.
format color col_positive.
write: 'HR-records deleted successfull'.
else.
format color col_negative.
write: 'Error when trying to update data base table AFRP4.'.
endif.
endif. -
Hi folks,
I am trying to delete a record from pa0019. Of course I am not deleting the record directly but copying the existing record into the workarea and deletingit.
However, query of selecting the record from table is not working.
tables: pa0019.
data: wa_pa0019 like pa0019 occurs 0 with header line.
select single * from pa0019 into wa_pa0019 where pernr = 'v_pernr'
and tmart = 'Z9' and termn = '07/07/2005'.
delete pa0019 from wa_pa0019.
I see a record for this employeeid in the table pa0019. why is not retrieving any record? Am I missing something here?
I know this is simple, and have done this before too, but not able to recall what is the problem here?
Any thoughts,
Thanks,
SKGlobal variables inthe program
DATA : RETURN LIKE BAPIRETURN1.
DATA : KEY LIKE BAPIPAKEY.
DATA : RETURNE LIKE BAPIRETURN1.
data: begin of itab1 occurs 0,
employee(8),
reason_type(2),
reason_code(2),
return_date like sy-datum,
end of itab1.
I read the data into the internal table from an external text file, then I upload the record(RLOA) into actions infotype using BDC session, then I need to delete the record for the same employee in 0019.
I think I am missing the RECORD parameter, hwo can i get that?
loop at itab1.
*** check to see whether there is a RLOA record for the employee
select single * from pa0000 where pernr = itab1-employee and
massn = 'z7' and begda = itab1-return_date.
if sy-subrc = 0.
error-employee = itab1-employee.
error-reason = 'RLOA exists for the employee'.
append error.
continue.
else.
clear bdcdata.
refresh bdcdata.
perform load_data.
If the RLOA record is created in Actions infotype delete
the record in monitoring of tasks record in IT0019
if g_monitoringflag = 'X'.
format the date to mm/dd/yyyy
v_returndate = itab1-return_date.
concatenate v_returndate0(2) '/' v_returndate2(2) '/'
v_returndate+4(4) into v_formatdate.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = itab1-employee
IMPORTING
RETURN = RETURNE.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0019'
NUMBER = itab1-employee
SUBTYPE = 'Z9'
VALIDITYEND = itab1-return_date
VALIDITYBEGIN = itab1-return_date
TMART ='Z9'
TERMN = itab1-return_date
OPERATION = 'DEL'
TCLAS = 'A'
DIALOG_MODE = '0'
IMPORTING
RETURN = RETURN
KEY = KEY.
IF RETURN IS NOT INITIAL.
WRITE :/ 'Error Occurred'.
ENDIF.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
NUMBER = itab1-employee.
if sy-subrc = 0.
clear:g_monitoringflag, v_formatdate.
else.
error-employee = itab1-employee.
error-reason = 'No record created for RLOA'.
clear:v_formatdate.
endif.
endif.
endif.
endloop.
Thanks in advance for your help.
SK -
Want to delete the records from Standard Infotype where PERNR is Blank
HI Experts,
I have a simple problem.
There are few blank PERNRs are in infotypes PA0001 and PA0002 in Production.I have to remove them.
These blank PERNRs records are populated there because of some mistake.
This can not be done in production.
I have checked many FMs ,but couldnt find the correct one.
Now I want to use a simple query to delete the records.Please tell me the query to delete the records.
First i used to read these empty records but failed to do so by the following query.
select * from PA0001 into table it_pa0001
where PERNR = ' ' .
This query is not reading any record.
I used PERNR is NULL then also it is not working.I used other key fields but it is fetching other records then blank PERNRs.
Kindly suggest.
~SachinPERNR is key field in all infotypes, while for all FMs which work with infotypes this field is obligatory . Such entry should never come to production. If this happened, this should be removed by some backdoor operation. Direct table record deletion I guess is here the only (though not necessary safely) way of handling that.
Correct query would be
select * from PA0001 into table it_pa0001
where PERNR = '00000000' .
PERNR is of type NUMC 8, so default value is not space but 8 zeros.
Regards
Marcin -
Comparing two internal tables and deleting the record not present in second
Hi All,
I have a internal table itaba with PERNR as primary key and various other columns (1000 records) and table B with PERNR as primary key and 800 records.
Now what is the best way to compare these two and delete the record from table A when its corresponding record is not present in table B?
Thanks and Regards,
MohanHI SIR
u trained us in accenture
Hi all
when ever m running this session in SM35 , M getting error as :
"LEAVE TO TRANSACTION" MARA-BISMT is not allow
in batch input
REPORT YASEC_BDC_NIK_SESSION
no standard page heading
message-id zmm
line-count 65
line-size 150.
tables : mara.
*Top includr program
INCLUDE YNEW_MAIN_TOP.
*include yasec_bdc_nik_session_top.
***********selection screen *******************
selection-screen begin of block b1 with frame title text-001.
selection-screen skip.
PARAMETERS: p_ifile(128) TYPE c .
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: rad1 TYPE c RADIOBUTTON GROUP 1 USER-COMMAND gr1,
rad2 TYPE c RADIOBUTTON GROUP 1 .
SELECTION-SCREEN SKIP.
PARAMETERS: p_sess TYPE c.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK b1.
Subroutine call***************************
INCLUDE YNEW_MAIN_F01.
*include yasec_bdc_nik_session_f01.
*********At selection event triggered *************
at selection-screen on value-request for p_ifile.
To get F4 help for the input file path
PERFORM f_f4_input_file.
AT SELECTION-SCREEN ON p_ifile.
To validate and upload the input file
PERFORM f_load_file.
AT SELECTION-SCREEN ON p_sess.
To validate the Number of Sessions field
IF rad2 IS NOT INITIAL AND sy-ucomm EQ c_onli.
PERFORM f_check_sessions.
ENDIF.
***********Start of selection *******************
start-of-selection.
*To process BDC
PERFORM f_process_bdc.
TOP OF PAGE
TOP-OF-PAGE.
Writes the report heading and for displaying line number.
PERFORM f_report_header.
TYPES : BEGIN OF t_final,
matnr(50) TYPE c,
bismt(18) type c,
end of t_final.
TYPES: BEGIN OF t_fdata,
data(256) TYPE c,
END OF t_fdata.
TYPES: BEGIN OF t_error,
message(100) TYPE c,
END OF t_error.
*Internal table declarations
*Internal table to load the data from the file that is changed throgh BDC
DATA : i_final TYPE STANDARD TABLE OF t_final,
wa_final TYPE t_final.
*Internal table to store the error messages
DATA : i_error TYPE STANDARD TABLE OF t_error,
wa_error TYPE t_error.
*Internal table to load the raw data
DATA : i_fdata TYPE STANDARD TABLE OF t_fdata,
wa_fdata TYPE t_fdata.
*Internal table to store records of BDC
DATA : i_bdcdata TYPE STANDARD TABLE OF bdcdata INITIAL SIZE 0,
wa_bdcdata TYPE bdcdata.
Internal table to store BDC messages
DATA: i_bdcmsgcoll TYPE STANDARD TABLE OF bdcmsgcoll INITIAL SIZE 0,
wa_bdcmsgcoll TYPE bdcmsgcoll.
VARIABLE DECLARATIONS
DATA: v_ifile TYPE string,
v_input TYPE i,
c_delimiter TYPE c VALUE 'X',
v_mode TYPE c VALUE 'A',
v_sessions TYPE i.
CONSTANTS
CONSTANTS : c_flagx TYPE c VALUE 'X',
c_slash TYPE c VALUE '/',
c_onli(4) TYPE c VALUE 'ONLI',
c_vl02(4) TYPE c VALUE 'VL02',
c_s TYPE c VALUE 'A'.
FORM f_f4_input_file .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_ifile.
ENDFORM. " f_f4_input_file
*& Form f_load_file
FORM f_load_file .
v_ifile = p_ifile.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = v_ifile
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = i_fdata
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.
*Text-103-Input file does not exist.
MESSAGE e000 WITH text-103 .
ELSEIF NOT i_fdata IS INITIAL.
DELETE i_fdata WHERE data = space.
DESCRIBE TABLE i_fdata LINES v_input.
ENDIF.
IF v_input EQ 0.
Text-104 - Input file is empty.
MESSAGE e000 WITH text-104 .
ENDIF.
ENDFORM. " f_load_file
*& Form f_check_sessions
FORM f_check_sessions .
IF p_sess IS INITIAL.
MESSAGE e000 WITH text-106.
ELSE.
v_sessions = v_input DIV p_sess.
ENDIF.
ENDFORM. " f_check_sessions
*& Form f_process_bdc
text
FORM f_process_bdc.
LOOP AT i_fdata INTO wa_fdata.
SPLIT wa_fdata AT cl_abap_char_utilities=>horizontal_tab
INTO wa_final-matnr
wa_final-bismt.
APPEND wa_final TO i_final.
CLEAR wa_fdata.
ENDLOOP.
IF rad1 = c_flagx.
PERFORM f_passbdc_vl02.
ELSEIF rad2 = c_flagx.
PERFORM f_sessions_vl02.
ENDIF.
ENDFORM. "f_process_bdc
To populate the Screen information
p_program Program Name
p_dynpro Screen Number
FORM bdc_dynpro USING p_program TYPE any
p_dynpro TYPE any.
CLEAR wa_bdcdata.
Populate the BDC structure with the Screen Information.
Move the Program name PROGRAM
wa_bdcdata-program = p_program.
Move the Screen Number DYNPRO
wa_bdcdata-dynpro = p_dynpro.
Indicate the beginning of a new screen
wa_bdcdata-dynbegin = c_flagx.
APPEND wa_bdcdata TO i_bdcdata.
ENDFORM. "f_bdc_dynpro
*& Form f_passbdc_vl02
text
FORM f_passbdc_vl02.
DATA: l_lines_im TYPE i.
SORT i_final BY matnr ASCENDING.
CLEAR wa_final.
LOOP AT i_final INTO wa_final.
CLEAR: i_bdcmsgcoll[],
wa_bdcmsgcoll,
wa_bdcdata.
CLEAR: i_bdcdata[].
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RMMG1-MATNR'
wa_final-matnr.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
'X'.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'MARA-BISMT'.
perform bdc_field using 'MARA-BISMT'
wa_final-bismt.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
perform bdc_transaction using 'MM02'.
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
perform bdc_transaction using 'MM03'.
CALL TRANSACTION 'MM02' USING i_bdcdata
MODE v_mode
UPDATE c_s
MESSAGES INTO i_bdcmsgcoll.
If error occurred in call transaction 'VA02' then stores all
information of failed records into internal table i_error_im.
IF sy-subrc NE 0.
DESCRIBE TABLE i_bdcmsgcoll LINES l_lines_im.
CLEAR wa_bdcmsgcoll.
READ TABLE i_bdcmsgcoll INTO wa_bdcmsgcoll INDEX l_lines_im.
To capture success and error messages in BDC.
CALL FUNCTION 'FORMAT_MESSAGE' "#EC *
EXPORTING
id = wa_bdcmsgcoll-msgid
lang = wa_bdcmsgcoll-msgspra
no = wa_bdcmsgcoll-msgnr
v1 = wa_bdcmsgcoll-msgv1
v2 = wa_bdcmsgcoll-msgv2
v3 = wa_bdcmsgcoll-msgv3
v4 = wa_bdcmsgcoll-msgv4
IMPORTING
msg = wa_error-message
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
ELSE.
WRITE: text-111 COLOR 7.
ENDIF.
CLEAR: wa_final.
REFRESH i_bdcdata.
ENDLOOP.
ENDFORM. "f_passbdc_va02
*& Form bdc_field
text
-->P_FNAM text
-->P_FVAL text
FORM bdc_field USING p_fnam TYPE any
p_fval TYPE any.
CLEAR wa_bdcdata.
Populate the Field Name
wa_bdcdata-fnam = p_fnam.
Populate the field value
wa_bdcdata-fval = p_fval.
APPEND wa_bdcdata TO i_bdcdata.
ENDFORM. "f_bdc_field
*& Form f_sessions_vl02
text
FORM f_sessions_vl02 .
DATA: l_sindex TYPE sy-tabix VALUE 1,
l_eindex TYPE sy-tabix,
l_flag TYPE c VALUE space.
l_eindex = v_input.
SORT i_final BY matnr ASCENDING.
DO p_sess TIMES.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = 'Y_VL02_NIK'
user = sy-uname
keep = c_flagx
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 wa_final.
CLEAR: i_bdcdata[].
LOOP AT i_final INTO wa_final FROM l_sindex TO l_eindex .
IF l_flag = v_sessions.
CLEAR l_flag.
EXIT.
ENDIF.
l_flag = l_flag + 1.
CLEAR: i_bdcdata[].
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RMMG1-MATNR'
wa_final-matnr.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
'X'.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'MARA-BISMT'.
perform bdc_field using 'MARA-BISMT'
wa_final-bismt.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
perform bdc_transaction using 'MM02'.
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
perform bdc_transaction using 'MM03'.
l_sindex = l_sindex + 1.
ENDLOOP.
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.
ENDDO.
ENDFORM. " f_sessions_vl02
*& Form f_report_header
FORM f_report_header .
FORMAT COLOR COL_HEADING INTENSIFIED ON.
ULINE.
text-201 - Company: Carrier
text-102- Batch Data Communication.
text-202 - System: SAP
WRITE: /1 sy-vline,
3 text-201,
50 text-102,
100 text-202,
AT sy-linsz sy-vline.
text-203 - Program:
text-204 - Date/Time:
WRITE: /1 sy-vline,
3 text-203, sy-repid ,
100 text-204,sy-datum ,c_slash, sy-uzeit,
AT sy-linsz sy-vline.
text-205 - User ID:
text-206 - Page:
WRITE: /1 sy-vline,
3 text-205, sy-uname,
100 text-206, sy-pagno,
AT sy-linsz sy-vline.
FORMAT COLOR OFF.
ULINE.
ENDFORM. " f_report_header
FORM bdc_transaction USING tcode.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
tcode = tcode
TABLES
dynprotab = i_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.
ELSE.
WRITE: / text-109 ,wa_final-matnr,
text-110 .
ENDIF.
ENDFORM. "bdc_transaction
Maybe you are looking for
-
I am new to weblogic server. l want to know about ldap, why it is used?. is it possible to configure ldap with security realms?. I want to know the procedure.
-
Hi, I have changed my Computer. Essentially, the M/B, CPU, RAM, HDD, etc. I still have my old HDD and Mozilla was installed there. I have a lot of saved passwords on that Firefox. I have started Firefox from there itself. Yet, FF doesn't find those p
-
Handling Idoc acknowledgements
Hi All, As per the document "How to handle acknowledgements for Idoc" I made all settings and i am able to get acknowledgement in XI. In the document it was said it is possible to configure ALEAUDIT as request message by executing the report IDX_ALE
-
Workflow scanning - Use space in file name
I configured two Xerox printers (WC 5875 and W 7835), with latest fimware installed, to scan on a windows shared folder using SMB protocol.The scan is working normally. But users experience this "interface" issue: is not possible to use SPACE charact
-
my given query return only date but i need date with time. my datatype is date format so i cant use the to_char function in my procedure bcz returning should be date format.... select to_date(sysdate, 'dd-mon-yyyy hh24:mi:ss') from dual;