Polling - records not updated
I created a db connection and selected
1) Poll for New or Changed records in a table (Step 4)
2) Update a field in the [table] Table (Logical Delete) (Step 8)
3) Field: abc Read Value: 1 Unread Value: 0 (Step 9)
The problem is right now it does not update the field ABC in the table.
Do you have any ideas?
Maybe the DB is not being polled at all.
is this the case?
Similar Messages
-
Delta records not updating from DSO to CUBE in BI 7
Hi Experts,
Delta records not updating from DSO to CUBE
in DSO keyfigure value showing '0' but in CUBE same record showing '-I '
I cheked in Change log table in DSO its have 5 records
ODSR_4LKIX7QHZX0VQB9IDR9MVQ65M - -1
ODSR_4LKIX7QHZX0VQB9IDR9MVQ65M - 0
ODSR_4LIF02ZV32F1M85DXHUCSH0DL - 0
ODSR_4LIF02ZV32F1M85DXHUCSH0DL - 1
ODSR_4LH8CXKUJPW2JDS0LC775N4MH - 0
but active data table have one record - 0
how to corrcct the delta load??
Regards,
JaiHi,
I think initially the value was 0 (ODSR_4LH8CXKUJPW2JDS0LC775N4MH - 0, new image in changelog) and this got loaded to the cube.
Then the value got changed to 1 (ODSR_4LIF02ZV32F1M85DXHUCSH0DL - 0, before image & ODSR_4LIF02ZV32F1M85DXHUCSH0DL - 1, after image). Now this record updates the cube with value 1. The cube has 2 records, one with 0 value and the other with 1.
The value got changed again to 0 (ODSR_4LKIX7QHZX0VQB9IDR9MVQ65M - (-1), before image &
ODSR_4LKIX7QHZX0VQB9IDR9MVQ65M - 0, after image). Now these records get aggregated and update the cube with (-1).
The cube has 3 records, with 0, 1 and -1 values....the effective total is 0 which is correct.
Is this not what you see in the cube? were the earlier req deleted from the cube? -
Info record not updated from PO , PO updated from Info record
Dear Gurus,
I want to restrict Base price in PO will be copied from Valid info record. User does not permitted to change the Base price once info record not maintained.
Kindly tell me the configuration steps to adopt the process ?
I don't want to update infor record from PO also.
I know while making PO i can untick infor record not update, but that is user specific.
Thanks in advance
With regards
SDDear Sidi,
Thanks . Problem solved.
When info record is maintained the price condition will get from there. for this change in condition type P001 , set "D" in manual entries column.
When info record is not maintained, then the system will try to get the price from last PO, if not present, it will throw an error u201CNet price must be greater than 0u201D and sets price condition PBXX (manual entry) to manually enter the price you want.
What you can do:
Is make the condition type P000 as automatic only (option D as below) and also same for condition type PBXX.
Regards
Soumen -
User status profile in Q-info record not updating on UD
Hi All,
My required scenario was, delivery of a material from a vendor must pass through inspection series
u2022 Model
u2022 Preliminary
u2022 Regular delivery
For that,
1). Maintain different inspection types (with corresponding task list usages) and create inspection plans with these usages.
2). Maintain the corresponding status profiles for the object type QINF and assigned inspection type to each status in 'SM30 - V_TQ32A'
3). Assign this status profiles in the quality info records for the relevant materials, vendors combination.
My problem is while GR against PO, inspection lot for the goods receipt is created automatically and system selects the inspection type as assigned to next status, BUT, When Quality person make a UD to inspection lot, the system NOT sets the next status in the status sequence i.e status not updating on UD. And even when UD is done for the existing lot system not allow for GR of next lot.
Kindly let me know where I am wrong.
Regards,Hi,
The problem is due to missing authorization object :B_USERSTAT".
Assign this authorization object in your id/role and give necessary values in the fields (activity, authorization key, object category and status profile) and then carry out the transaction again.
Thanks
SUMIT. -
User status in Q-info record not updating on UD
Hi All,
My required scenario was, delivery of a material from a vendor must pass through inspection series
u2022 Model
u2022 Preliminary
u2022 Regular delivery
For that,
1). Maintain different inspection types (with corresponding task list usages) and create inspection plans with these usages.
2). Maintain the corresponding status profiles for the object type QINF and assigned inspection type to each status in 'SM30 - V_TQ32A'
3). Assign this status profiles in the quality info records for the relevant materials, vendors combination.
My problem is while GR against PO, inspection lot for the goods receipt is created automatically and system selects the inspection type as assigned to next status, BUT, When Quality person make a UD to inspection lot, the system NOT sets the next status in the status sequence i.e status not updating on UD. And even when UD is done for the existing lot system not allow for GR of next lot.
Kindly let me know where I am wrong.
Regards,closed
-
Status profile in Q-info record not updating on UD
HI All,
My required scenario was, delivery of a material from a vendor must pass through inspection series
u2022 Model
u2022 Preliminary
u2022 Regular delivery
For that,
1). Maintain different inspection types (with corresponding task list usages) and create inspection plans with these usages.
2). Maintain the corresponding status profiles for the object type QINF and assigned inspection type to each status in 'SM30 - V_TQ32A'
3). Assign this status profiles in the quality info records for the relevant materials, vendors combination.
My problem is while GR against PO, inspection lot for the goods receipt is created automatically and system selects the inspection type as assigned to next status, BUT, When Quality person make a UD to inspection lot, the system NOT sets the next status in the status sequence i.e status not updating on UD. And even when UD is done for the existing lot system not allow for GR of next lot.
Kindly let me know where I am wrong.
Regards,any clue??
Regards, -
All,
I have created a info record with net price 200 .
Then I have created a PO for net price 350 .
I have ticked the ' info update ' .
But while going to the info record again the net price is not update .
1. Why it is like this ?
2. Also tax code I put in the PO which was blank in the info record .
Tax code is not coming in the same info record , please explain ?
regardsHi Sandeep,
There are two types of info records,
one with basic information, no prices etc. but with a PO history (and price history) attached
the other is the full infor record maintained manually in ME11 and 12.
The update info record flag on the PO ONLY updates the first type of info record, it does not affect the price etc., this can be added and maintained but only manually via ME11 or ME12.
So the title of the flag is misleading.
It works OK if you have the system set up to suggest the last price paid, but if you want to use FULL info records then all it is doing is recording the PO price history against the basic info record.
Steve B -
I had a beautiful application working, decided to rename a
few of the database fields and change the data types to decimals to
enhance the app and now I cannot get a record to update on my
existing update page. I have deleted the recordset and readded it
(no red exclamation points), and relinked all the fields and even
changed the URL parameter on the main page which the EDIT link is
on. I get the correct record to display on the edit page and even
the two dyamic fields are displaying the correct data however when
I click to update the record, it doesn't update. Help
please!On the first instance of this problem I did change the
datatype from integer to decimal. Went back and changed in the
Update behavior to Double so that I could see the decimal values.
Still can't update records in that database but I have a new issue
with a database that is strictly VARCHAR across the board.
I had the update page working which was built using the
Update Record Wizard. Linked and EDIT button and that worked too.
Updated records just fine. Went to change one of the fields to be a
dropdown list box with the Dynamic value linked to hold the proper
choice in the Update page and now I'm getting the same behavior.
Record displays properly when clicking Edit, values look right,
then I make a change (any change - not just a dropdown choice) and
I get taken back to the original page but no update. This is very
frustrating.
Steve -
Database Adapter using Logical Delete Polling Strategy not updating field
I have an ESB database adapter defined against a table. The adapter is set to use the Logical Delete Polling Strategy, and the table has an extra column defined as the "delete" field. When I register the adapter to the ESB and add a record to the table, the adapter reads the contents of the record as expected. However, 15 seconds later (that being the polling interval) it reads it again, and again 15 seconds after that, ad infinitum.
I have defined the logical delete field as a single character field and set the Read value for "T" (a record is normally inserted with that field having a null value). Results as outlined in the previous paragraph. I redefined the field as a number and set the Read value to "1" (with a record normally inserted with that field having a value of "0"). Results as outlined in the previous paragraph.
Apparently the update of the logical delete value to the Read value is not occurring. My question (obviously) is: Why?
Thanks for your time.Here is the adapter WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<definitions
name="Poll_PM_LOG"
targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/Poll_PM_LOG/"
xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/db/Poll_PM_LOG/"
xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
xmlns:pc="http://xmlns.oracle.com/pcbpel/"
xmlns:top="http://xmlns.oracle.com/pcbpel/adapter/db/top/PollPMLOG"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/PollPMLOG"
schemaLocation="PollPMLOG_table.xsd"/>
</schema>
</types>
<message name="LogCollection_msg">
<part name="LogCollection" element="top:LogCollection"/>
</message>
<portType name="Poll_PM_LOG_ptt">
<operation name="receive">
<input message="tns:LogCollection_msg"/>
</operation>
</portType>
<binding name="Poll_PM_LOG_binding" type="tns:Poll_PM_LOG_ptt">
<pc:inbound_binding/>
<operation name="receive">
<jca:operation
ActivationSpec="oracle.tip.adapter.db.DBActivationSpec"
DescriptorName="PollPMLOG.Log"
QueryName="Poll_PM_LOG"
PollingStrategyName="LogicalDeletePollingStrategy"
MarkReadFieldName="PROCESSED"
MarkReadValue="T"
SequencingFieldName="ID"
MaxRaiseSize="1"
MaxTransactionSize="unlimited"
PollingInterval="15"
NumberOfThreads="1"
UseBatchDestroy="false"
ReturnSingleResultSet="false"
MappingsMetaDataURL="PollPMLOG_toplink_mappings.xml" />
<input/>
</operation>
</binding>
<service name="Poll_PM_LOG">
<port name="Poll_PM_LOG_pt" binding="tns:Poll_PM_LOG_binding">
<jca:address location="eis/DB/PM"
UIConnectionName="PM"
ManagedConnectionFactory="oracle.tip.adapter.db.DBManagedConnectionFactory"
/>
</port>
</service>
<plt:partnerLinkType name="Poll_PM_LOG_plt" >
<plt:role name="Poll_PM_LOG_role" >
<plt:portType name="tns:Poll_PM_LOG_ptt" />
</plt:role>
</plt:partnerLinkType>
</definitions>
The field PROCESSED is defined as CHAR(1), and is normally null when a record is inserted. The value of the field is to be set to 'T' when the record is read by the polling adapter. -
Record not updating into table helpme
in the following functionmodule record is not commiting into table is there any wrong please hep me.
FUNCTION Z_MZPR_DETAILS.
""Local Interface:
*" IMPORTING
*" VALUE(ZPRHEADER) TYPE BAPIMEREQHEADER OPTIONAL
*" VALUE(ZPRHEADERX) TYPE BAPIMEREQHEADERX OPTIONAL
*" EXPORTING
*" VALUE(ZNUMBER) TYPE BAPIMEREQHEADER-PREQ_NO
*" VALUE(RETURN) LIKE BAPIRET2 STRUCTURE BAPIRET2
*" TABLES
*" ZPRITEM STRUCTURE BAPIMEREQITEMIMP
*" ZPRITEMX STRUCTURE BAPIMEREQITEMX OPTIONAL
*" ZPRACCOUNT STRUCTURE BAPIMEREQACCOUNT OPTIONAL
*" ZPRACCOUNTX STRUCTURE BAPIMEREQACCOUNTX OPTIONAL
DATA:ITAB LIKE TABLE OF ZPRDETAILS WITH HEADER LINE,
ZRETURN LIKE TABLE OF RETURN WITH HEADER LINE.
CALL FUNCTION 'BAPI_PR_CREATE'
EXPORTING
PRHEADER = ZPRHEADER
PRHEADERX = ZPRHEADERX
TESTRUN =
IMPORTING
NUMBER = ZNUMBER
PRHEADEREXP =
TABLES
RETURN = ZRETURN
PRITEM = ZPRITEM
PRITEMX = ZPRITEMX
PRITEMEXP =
PRITEMSOURCE =
PRACCOUNT = ZPRACCOUNT
PRACCOUNTPROITSEGMENT =
PRACCOUNTX = ZPRACCOUNTX.
PRADDRDELIVERY =
PRITEMTEXT =
PRHEADERTEXT =
EXTENSIONIN =
EXTENSIONOUT =
PRVERSION =
PRVERSIONX =
ALLVERSIONS =
ITAB-BANFN = ZNUMBER.
APPEND ITAB.
IF ZRETURN-NUMBER = '000'.
UPDATE ZPRDETAILS from TABLE ITAB.
COMMIT WORK.
ENDFUNCTION.HI,
IF ZRETURN-NUMBER = '000'.
<b>MODIFY ZPRDETAILS from TABLE ITAB.</b>
COMMIT WORK.
<b>ENDIF.</b>
Best regards,
Prashant -
URGENT: master data records not updating
hi all,
this is all in Prod server.
i have first level C1 center infoobject in BW and second level C2 center infoobject.
C1 has data like
center-<i>1234,</i>
valid from : <i>01.01.1000</i>
valid to: <i>31.12.2006</i>again another record for the same center
center-<i>1234</i>
valid from : <i>01.01.2007</i>
valid to: <i>31.12.9999</i>
so when i do the full update from C1 to C2 then C2 should also have the same data as above but it C2 is having only this record
center: <i>1234</i>
valid from: <i>01.01.1000</i>
valid to: <i>31.12.9999</i>
it was not the case before, i had very fine data in C2 just like in C1 because C2<-C1 (C2 gets data from C1)
i have tried with options like start date 01.01.1000 end date 31.12.9999 in the infopackage settings under <i>Update</i> tab
I have gone for simulate update of the pacage in every step of transfer rules, communcation structure and update of data target. the transfer rules has the fine data as in C1 but when it is landing in C2, valid to and valid from is 01.01.1000 and 31.12.9999, it is not fetching interval records with valid to 01.01.2007 to 31.12.9999
Please suggest what i must do to have the same data which is there in C1 object in C2.hi lieu,
logically u r center means it is valid through out year (01.01.1000--31.12.9999).
load center for one time zone the system automatically partions the second half.
you can refer c1 to c2. this may be simple.
bye. -
Polling for database updates fails to update sequence file/table
I have a small system to poll for changes to a database table of student details. It consists of:
Database adapter, which polls the database for changes, retreives a changed row, and passes the generated XML to -
"receive" router service, which simply passes the retrieved database XML data to -
"execute" router service, which transforms the XML and passes the new message to -
File Adapter, which writes the transformed XML to a file.
The problem is that the database polling is not updating the sequence recorder - I have tried using a sequence file which stores the personnumber, a sequence table which stores the personnumber and a sequence table which stores the last-updated timestamp. In all cases the database adapter successfully reads the sequence file/table and retreives the correct row, based on the sequence value ( I have tested this by manually changing the sequence value), the data is transformed and a correct xml file is created, but the system then fails to update the sequence file/table so that when the next polling time comes around the very same database row is extracted again and again and again.
In the ESB control panel I have one error: "Response payload for operation "receive" is invalid!"
The Trace is:
oracle.tip.esb.server.common.exceptions.BusinessEventRejectionException: Response payload for operation "receive" is invalid! at oracle.tip.esb.server.service.EsbRouterSubscription.processEventResponse(Unknown Source) at oracle.tip.esb.server.service.EsbRouterSubscription.onBusinessEvent(Unknown Source) at oracle.tip.esb.server.dispatch.EventDispatcher.executeSubscription(Unknown Source) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.processSubscription(Unknown Source) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.processSubscriptions(Unknown Source) at oracle.tip.esb.server.dispatch.EventDispatcher.dispatchRoutingService(Unknown Source) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(Unknown Source) at oracle.tip.esb.server.dispatch.BusinessEvent.raise(Unknown Source) at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(Unknown Source) at oracle.tip.esb.server.service.impl.inadapter.ESBListenerImpl.processMessage(Unknown Source) at oracle.tip.esb.server.service.impl.inadapter.ESBListenerImpl.onMessage(Unknown Source) at oracle.tip.adapter.fw.jca.messageinflow.MessageEndpointImpl.onMessage(MessageEndpointImpl.java:281) at oracle.tip.adapter.db.InboundWork.onMessageImpl(InboundWork.java:1381) at oracle.tip.adapter.db.InboundWork.onMessage(InboundWork.java:1291) at oracle.tip.adapter.db.InboundWork.transactionalUnit(InboundWork.java:1262) at oracle.tip.adapter.db.InboundWork.runOnce(InboundWork.java:501) at oracle.tip.adapter.db.InboundWork.run(InboundWork.java:401) at oracle.tip.adapter.db.inbound.InboundWorkWrapper.run(InboundWorkWrapper.java:43) at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242) at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215) at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:819) at java.lang.Thread.run(Thread.java:595)
The payload is:
<PersonCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/ISSSimIN">
<Person>
<name>Bob</name>
<surname>Stupid</surname>
<istatus>2</istatus>
<active>Active</active>
<personnumber>3001</personnumber>
<role>Staff</role>
<organization>TEX</organization>
<updateTimestamp>2007-11-29T14:06:55.000+00:00</updateTimestamp>
</Person>
</PersonCollection>
The payload above is the XML output from the Database adapter, the xsd for which was autogenerated by JDeveloper, so I don't understand how it can be invalid.
I have only been working with ESB for 3 days, but half of that time has now been spent stuck on this issue. Anyone got any ideas??
RichardYou need to be careful. Submit and committing to the database are two different things.
Submit on a page (and autoSubmit the property) are only posting the changes you typed into the field, back down to the application server. NOTHING is happening with the database at this point. So the applications's internal "cache" of records (using something like ADF BC) is holding the changes but the database doesn't know anything. So if you quit now, no changes will go to the database.
These changes onlyget submitted down to the app server when you do some sort of action like press a button. Simply navigating fields will be doing nothing back to the app server. If you add autoSubmit then you will automatically submit the changes on that field down to the app server when you leave the field (but again, this is not touching the database)
You have to explicitly add a COMMIT operation to save those changes to the database.
Maybe if you try in a simple EMP example and send us your findings we can help direct you further.
Regards
Grant -
hi alll
1. i have written below coding for vendor master update. i have two records in text file, in that first record not updated. while updating its shows error. but second record updated. how can i solve. plse help me
2. I want to show the error message or i want to print how can i do it
REPORT ZVENTESTBDC.
data : begin of it_xk01 occurs 0,
LIFNR(10) type c,
BUKRS(4) type c,
EKORG(4) type c,
KTOKK(4) type c,
NAME1(30) type c,
SORT1(10) type c,
LAND1(3) type c,
AKONT(10) type c,
FDGRV(10) type c,
WAERS(3) type c,
end of it_xk01.
DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:\Documents and Settings\entegall\Desktop\vendor.txt'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = it_xk01.
loop at it_xk01.
refresh it_bdcdata.
perform open_group.
perform bdc_dynpro using 'SAPMF02K' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-REF_LIFNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02K-LIFNR'
it_xk01-lifnr.
perform bdc_field using 'RF02K-BUKRS'
IT_XK01-BUKRS.
perform bdc_field using 'RF02K-EKORG'
IT_XK01-EKORG.
perform bdc_field using 'RF02K-KTOKK'
IT_XK01-KTOKK.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-LAND1'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFA1-NAME1'
IT_XK01-NAME1.
perform bdc_field using 'LFA1-SORTL'
IT_XK01-SORT1.
perform bdc_field using 'LFA1-NAME2'
perform bdc_field using 'LFA1-LAND1'
IT_XK01-LAND1.
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-BANKS(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02K' '0210'.
perform bdc_field using 'BDC_CURSOR'
'LFB1-FDGRV'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFB1-AKONT'
IT_XK01-AKONT.
perform bdc_field using 'LFB1-FDGRV'
IT_XK01-FDGRV.
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 'SAPMF02K' '0310'.
perform bdc_field using 'BDC_CURSOR'
'LFM1-WAERS'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFM1-WAERS'
IT_XK01-WAERS.
perform bdc_dynpro using 'SAPMF02K' '0320'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-LIFNR'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
*perform bdc_transaction using 'XK01' using IT_BDCDATA mode 'A' UPDATE 'S'
CALL TRANSACTION 'XK01' USING IT_BDCDATA
MODE 'A'
UPDATE 'S' MESSAGES INTO IT_BDCMSGCOLL.
*perform close_group.
endloop.
FORM BDC_DYNPRO USING PROG SCR.
CLEAR IT_BDCDATA.
IT_BDCDATA-PROGRAM = PROG.
IT_BDCDATA-DYNPRO = SCR.
IT_BDCDATA-DYNBEGIN = 'X'.
APPEND IT_BDCDATA.
ENDFORM.
FORM BDC_FIELD USING FNAM FVAL.
CLEAR IT_BDCDATA.
IT_BDCDATA-FNAM = FNAM.
IT_BDCDATA-FVAL = FVAL.
APPEND IT_BDCDATA.
ENDFORM.go through this porgarm u will get the clear picture about down loading the error msg.
PROGRAM ID : ZSD_CONDREC_DISCOUNT_ZSWD
DESCRIPTION : BDC PROGRAM TO UPLOAD CONDITION RECORDS FOR Discount
TRANSACTION : VK11
CONDITION TYPE : ZSWD(Key combination 3)
VERSION : 1.0
Text Elements
001 : Select Options
002 : C:\SD\Error\Discount-ZSWD
003 : Error Download Path
004 : C:\SD\Error\Discount-ZSWD - DDMMYYYY HH:MM:SS.txt
REPORT ZSD_CONDREC_DISCOUNT_ZSWD
MESSAGE-ID 00.
*include bdcrecx1.
TABLES : t100.
Internal table declaration *
DATA : BEGIN OF it_price OCCURS 0,
index(4), "Index
kschl(4), "Condition type
vkorg(4), "Sales organization
vtweg(2), "distribution channel
spart(2), "Division
matnr(18), "Material no
kbetr(11), "Rate
konwa(5), "Rate unit (currency or percentage)
kmein(3), "Condition unit
krech(1), "Calculation type for condition
datab(10), "Validity start date
datbi(10), "Validity end date
er_message(100),
END OF it_price.
Internal table to get the error data *
DATA : it_error LIKE it_price OCCURS 0 WITH HEADER LINE.
DATA : bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
DATA : i_msgtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
Internal table to find the error from the legacy data *
DATA : BEGIN OF it_erfind OCCURS 0,
index(4), "Index
er_message(100), "For Error Message
END OF it_erfind.
Variables declaration *
DATA : g_message(200),
time(10),
date(10) ,
v_error_filename LIKE rlgrap-filename.
date = sy-datum.
time = sy-uzeit.
Initialization
INITIALIZATION.
Generating Error file name with date and time.
PERFORM make_file_name.
Selection Screen *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETER: p_file LIKE ibipparms-path OBLIGATORY.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) text-003.
SELECTION-SCREEN COMMENT 33(79) text-004.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN:END OF BLOCK b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file .
PERFORM get_filename.
Start of selection
START-OF-SELECTION.
PERFORM upload_data.
PERFORM fill_data.
END-OF-SELECTION.
*& Form fill_data
text
FORM fill_data.
LOOP AT it_price.
*Start of Screen 1
PERFORM bdc_dynpro USING 'SAPMV13A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV13A-KSCHL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ANTA'.
PERFORM bdc_field USING 'RV13A-KSCHL'
it_price-kschl.
Key Combination: Sales org / Dist. channel / Division / Material
PERFORM bdc_dynpro USING 'SAPLV14A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV130-SELKZ(03)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=WEIT'.
PERFORM bdc_field USING 'RV130-SELKZ(03)'
'X'.
*Start of Screen 2
PERFORM bdc_dynpro USING 'SAPMV13A' '1800'.
PERFORM bdc_field USING 'KOMG-VKORG'
it_price-vkorg.
PERFORM bdc_field USING 'KOMG-VTWEG'
it_price-vtweg.
PERFORM bdc_field USING 'KOMG-SPART'
it_price-spart.
PERFORM bdc_field USING 'KOMG-MATNR(01)'
it_price-matnr.
PERFORM bdc_field USING 'KONP-KBETR(01)'
it_price-kbetr.
PERFORM bdc_field USING 'KONP-KONWA(01)'
it_price-konwa.
PERFORM bdc_field USING 'KONP-KMEIN(01)'
it_price-kmein.
PERFORM bdc_field USING 'RV13A-KRECH(01)'
it_price-krech.
PERFORM bdc_field USING 'RV13A-DATAB(01)'
it_price-datab.
PERFORM bdc_field USING 'RV13A-DATBI(01)'
it_price-datbi.
perform bdc_dynpro using 'SAPMV13A' '1821'.
perform bdc_field using 'BDC_CURSOR'
'KOMG-MATNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SICH'. "Save the entry
PERFORM bdc_transaction TABLES i_msgtab USING 'VK11' 'N' 'L'.
*To fetch the error message from the standard error table
SELECT SINGLE * FROM t100 WHERE sprsl = 'E'
AND arbgb = sy-msgid
AND msgnr = sy-msgno.
g_message = t100-text.
*subroutine to change the error message for every document number
PERFORM replace_parameters USING sy-msgv1
sy-msgv2
sy-msgv3
sy-msgv4
CHANGING g_message.
WRITE: / 'System variables:'.
SKIP.
WRITE: / ' Sy-msgty:', sy-msgty.
WRITE: / ' Sy-msgid:', sy-msgid.
WRITE: / ' Sy-msgno:', sy-msgno.
WRITE: / ' Sy-msgv1:', sy-msgv1.
WRITE: / ' Sy-msgv2:', sy-msgv2.
WRITE: / ' Sy-msgv3:', sy-msgv3.
WRITE: / ' Sy-msgv4:', sy-msgv4.
SKIP.
WRITE: / 'Message:'.
SKIP.
WRITE: / sy-msgty, g_message.
*To find out the error in the legacy data if there is anything and pass
*the document no with error message to the seperate internal table
*called it_erfind
IF sy-msgty = 'E'.
it_erfind-index = it_price-index.
it_erfind-er_message = g_message.
APPEND it_erfind.
ENDIF.
*Finally we are segregating the error and downloading the error data.
AT LAST.
*To segregate the error
PERFORM segregate_error.
*To download the error from it_error internal table with err mesg
PERFORM error_download.
PERFORM display_message.
ENDAT.
ENDLOOP.
perform close_group.
CLEAR it_price.
ENDFORM. "fill_data
*Subrotine to replace the parameters
FORM replace_parameters USING p_par_1 p_par_2 p_par_3
p_par_4 CHANGING p_message.
erst mal pruefen, ob numerierte Parameter verwendet wurden
DO.
REPLACE '&1' WITH p_par_1 INTO p_message.
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDDO.
DO.
REPLACE '&2' WITH p_par_2 INTO p_message.
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDDO.
DO.
REPLACE '&3' WITH p_par_3 INTO p_message.
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDDO.
DO.
REPLACE '&4' WITH p_par_4 INTO p_message.
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDDO.
falls keine numerierten Parameter vorh., ersetzen wie gehabt
REPLACE '&' WITH p_par_1 INTO p_message.
CONDENSE p_message.
IF sy-subrc EQ 0.
REPLACE '&' WITH p_par_2 INTO p_message.
CONDENSE p_message.
IF sy-subrc EQ 0.
REPLACE '&' WITH p_par_3 INTO p_message.
CONDENSE p_message.
IF sy-subrc EQ 0.
REPLACE '&' WITH p_par_4 INTO p_message.
CONDENSE p_message.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. "REPLACE_PARAMETERS
*Subroutine to segregate the error data from the legacy data
FORM segregate_error.
LOOP AT it_erfind.
LOOP AT it_price WHERE index = it_erfind-index.
MOVE-CORRESPONDING it_price TO it_error.
it_error-er_message = it_erfind-er_message.
APPEND it_error.
ENDLOOP.
ENDLOOP.
ENDFORM. "segregate_error
*Subroutine to download the error data from the it_error table.
FORM error_download.
IF it_error[] IS NOT INITIAL.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
codepage = 'IBM'
filename = v_error_filename
filetype = 'DAT'
TABLES
data_tab = it_error.
ENDIF.
ENDFORM. "error_download
Start new screen *
FORM bdc_dynpro USING program dynpro.
CLEAR bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
ENDFORM. "BDC_DYNPRO
Insert field *
FORM bdc_field USING fnam fval.
IF FVAL <> NODATA.
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDIF.
ENDFORM. "BDC_FIELD
*& Form bdc_transaction
text
-->MESSTAB text
-->TCODE text
-->CTUMODE text
-->CUPDATE text
FORM bdc_transaction TABLES messtab USING tcode ctumode cupdate .
CALL TRANSACTION tcode USING bdcdata
MODE ctumode
UPDATE cupdate
MESSAGES INTO messtab.
REFRESH bdcdata.
CLEAR bdcdata.
ENDFORM. " bdc_transaction
Uploading data file to internal table. *
FORM upload_data.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = p_file
CODEPAGE = 'IBM '
filetype = 'DAT'
TABLES
data_tab = it_price
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 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.
ENDFORM. "upload_data
*& Form display_message
FORM display_message .
IF it_error[] IS INITIAL.
MESSAGE i019(zmsg). "Success
ELSE.
MESSAGE e020(zmsg). "Failed
ENDIF.
ENDFORM. " display_message
*& Form get_filename
text
--> p1 text
<-- p2 text
FORM get_filename .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
FIELD_NAME = p_file
IMPORTING
file_name = p_file .
IF sy-subrc NE 0 .
WRITE : / 'Enter File Name'.
ENDIF.
ENDFORM. " get_filename
*& Form make_file_name
FORM make_file_name .
WRITE sy-datum TO date MM/DD/YYYY.
WRITE sy-uzeit TO time USING EDIT MASK ' __ __ __'.
CONCATENATE text-002 date time '.txt'
INTO v_error_filename.
ENDFORM. " make_file_name
regards
prabhu -
Not Updating Customized Table when System having Performance Issue
Hi,
This is actually the same topic as "Not Updating Customized Table when System having Performance Issue" which is posted last December by Leonard Tan regarding the user exit EXIT_SAPLMBMB_001.
Recently we changed the program function module z_mm_save_hide_qty to update task. However this causes more data not updated. Hence we put back the old version (without the update task). But now it is not working as it used to be (e.g. version 1 - 10 records not updated, version 2 with update task - 20 records not updated, back to version 1 - 20 records not updated).
I tried debugging the program, however whenever I debugged, there is nothing wrong and the data is updated correctly.
Please advise if anyone has any idea why is this happening. Many thanks.
Regards,
JanetHi Janet,
you are right. This is a basic rule not to do any COMMIT or RFC calls in a user exit.
Have a look at SAP note 92550. Here they say that exit EXIT_SAPLMBMB_001 is called in the update routine MB_POST_DOCUMENT. And this routine is already called in UPDATE TASK from FUNCTION 'MB_UPDATE_TASKS' IN UPDATE TASK.
SAP also tells us not to do any updates on SAP system tables like MBEW, MARD, MSEG.
Before the exit is called, now they call 'MB_DOCUMENT_BADI' with methods MB_DOCUMENT_BEFORE_UPDATE and MB_DOCUMENT_UPDATE. Possibly you have more success implementing the BADI.
I don't know your situation and goal so this is all I can tell you now.
Good luck!
Regards,
Clemens -
JCA Polling Adapter not picking up records
Hello All
I have been trying to configure a JCA polling adapter to pick up records from the Database, the first time I configured it, it read a whole bunch of records. Now I have configured the following in the database and am getting no records being polling.
1. Poll for new or changed records
2. Update a field in the table F40g02 for logical delete
3. Read value = READ, UNREAD value = UNREAD, Reserved value = RESERVED
4.Polling interval 5 seconds, Database XROWS per xml document 1, Database Rows per Transaction 10
I ran the SQL specified in the adapter and I get a record. Does anyone have any idea.
I have seen this warning in the EM
Database Adapter <oracle.tip.adapter.db.inbound.IPAddrPollingService getUniqueMarkReservedValue> The markReservedValue of distributed polling might not be a unique value. To make it so, you can add the last x digits (default = 2) of the host IP address using this format for the MarkReservedValue: [original_val]${IP[-x]}
RegardsHello
The problem I am facing is I can't get the records that are processed (already READ) to not poll again despite the value being changed to the READ value configured, if I set the READ value in the configuration it will poll every record all the time despite the fact it is equal to the READ value. Then if I set the READ value and any other value no records will poll.
Consider 4 records in the DB (currently in test I have 431 but I have used distributed locking and ReturnSingleResultSet to limit it)
ID = 1, STATUS = PROCESSED
ID = 2, STATUS = UNPROCESSED
ID = 3, STATUS = UNPROCESSED
ID = 4, STATUS = OTHER
Config 1: If READ = PROCESSED records 1,2,3,4 will poll
Config 2: If READ = PROCESSED, UNREAD = UNPROCESSED no records will poll
Config 3: If READ = PROCESSED, UNREAD = UNPROCESSED, RESERVED = OTHER no records will poll
Config 4: If READ = PROCESSED and TOPLINK STATUS not equal string "PROCESSED" then records 1,2,3,4 will poll
What I want is Record 2 and 3 to poll which I believe is config 3 should do. However I believe there have been some changes that relate to distributed polling for clusters in 11.1.1.3 onwards which means in jdeveloper (11.1.1.6) when I go to re-config the db adapter after setting the RESERVED value it disappears from the editor .
JCA properties obviously with a MarkReservedValueand MarkUnreadValue column jumping in.depending on which config I am trying
<property name="DescriptorName" value="dbPollBlockRecords.F40G02"/>
<property name="QueryName" value="dbPollBlockRecordsSelect"/>
<property name="MappingsMetaDataURL" value="dbPollBlockRecords-or-mappings.xml"/>
<property name="PollingStrategy" value="LogicalDeletePollingStrategy"/>
<property name="MarkReadColumn" value="STATUS"/>
<property name="MarkReadValue" value="PROCESSED"/>
<property name="PollingInterval" value="700"/>
<property name="MaxRaiseSize" value="1"/>
<property name="MaxTransactionSize" value="10"/>
<property name="NumberOfThreads" value="1"/>
<property name="ReturnSingleResultSet" value="true"/> (This property has been manually configured, will unfortunately poll all records that match without it)
Regards
Maybe you are looking for
-
Install Oracle 11gR2 Express Edition on Ubuntu Linux 11.04 (64-bit) Howto
h2. Install Oracle 11gR2 Express Edition on Ubuntu Linux 11.04 (64-bit) Howto Version: B Author: Dude, 24. May 2011 The following are step by step instructions how to install Oracle 11gR2 Express Edition (Beta) under Linux Ubuntu 11.04, 64-bit. Acces
-
I can't install the Net Framework 3.5 on my PC. When I launch the exectuable, nothing shows up on the screen. I want to set up Exchange 2010 on a VM with Server 2008, but I always receive those errors: I receive these errors while trying to set up Ex
-
Is there any limit for VISA allocate DMA memory ?
Hi, I have get an error: -1073807300, when I allocate memory for DMA larger than 4M Bytes. Is there any limit for allocate memory for DMA ? I have run the attach vi on win7 32bit or 64bit, It seems there is a limit at about 4M Bytes. However I can al
-
I have been backing up address book from my BB via desktop manager to a file on my PC, How can I view the files (old address book)on my PC, is it possible? It seems as if i would have to transfer it back to the BB, which would delete the current o
-
Captivate 7 freezing when trying to edit spelling preferences?
It's really as simple as the title says. My version of Captivate 7 freezes everytime I open spelling options? I'm using the Mac version. Has anyone else had this problem? Am I missing some files, or something?