Regarding using of EXTENSION1 and EXTENSION2 in BAPI_OUTB_DELIVERY_CHANGE

Hi,
Can any one please help me how to code for zfields in EXTENSION1 and EXTENSION2 in BAPI_OUTB_DELIVERY_CHANGE
Thanks,
Nethaji.

I had a requirement to change a Z field in LIKP by a BAPI call and found this thread.
Although the original participant probably have found alternative ways, I hope this can be helpful for others search for a solution to this.
These are my findings u2013 please correct me if I am wrong. The EXTENSION1 & EXTENSION2 can NOT be used to change LIKP Z-fields. These doesnu2019t do anything in themselves, but can be imported in BADI IF_EX_SMOD_V50B0001~EXIT_SAPLV50I_010 (Thereu2019s a corresponding CMOD in older versions).
However, the data available here are :
CS_VBKOK
CT_VBPOK
CT_VBSUPCON
EXTENSION1
EXTENSION2
So, for changes to delivery header, only fields in structure CS_VBKOK can be changed. As VBKOK does not have any customer appends, this is not possible. Furthermore is the BAPI BAPI_OUTB_DELIVERY_CHANGE only calling WS_DELIVERY_UPDATE anyway, so the BAPI can not do any magic the FM canu2019t. So what is the purpose with  EXTENSION1/ EXTENSION2 ?
As I see it, itu2019s a handy way to transfer data to the BADI, so you can build logic to manipulate any of the existing CS_VBKOK fields. You could have done the same with a Memory export/import anyway.
/END-BAD-NEWS
/BEGIN-GOOD-NEWS
After some trial and error, I managed to use BAPI_OUTB_DELIVERY_CHANGE to change Z fields in LIKP. Before the call, I export the desired content to a memory ID, which I then import in MV50AFZ1, BAPI_OUTB_DELIVERY_CHANGE
See this working demonstration code :
Calling program :
*& Report  ZTEST_BAPI_DELIVERY_CHANGE
report  ztest_bapi_delivery_change.
data : gs_bapiobdlvhdrchg        type bapiobdlvhdrchg.
data : gs_bapiobdlvhdrctrlchg    type bapiobdlvhdrctrlchg.
data : gs_bapidlvcontrol         type bapidlvcontrol.
data : gt_bapireturn type standard table of  bapiret2.
data : gs_bapireturn type  bapiret2.
data : gs_likp type likpvb.
data : ld_zzhuload   type erlkz.
constants: gc_x(1)     type c value 'X'.
parameter : p_vbeln like likp-vbeln.
Get relevant LIKP fields
select * from likp
into corresponding fields of gs_likp
where vbeln = p_vbeln.
endselect.
  Fill header data - convert to BAPI format
call function 'MAP2E_LIKPVB_TO_BAPIOBDLVHDRCH'
  exporting
    likpvb          = gs_likp
  changing
    bapiobdlvhdrchg = gs_bapiobdlvhdrchg.
Field to set as LIKP Z-field
ld_zzhuload = 'X'.
Memory-ID imported in MV50AFZ1
export ld_zzhuload to memory id 'ZZHULOAD'.
call function 'BAPI_OUTB_DELIVERY_CHANGE'
  exporting
    header_data           = gs_bapiobdlvhdrchg
    header_control        = gs_bapiobdlvhdrctrlchg
    delivery              = gs_bapiobdlvhdrchg-deliv_numb
    techn_control         = gs_bapidlvcontrol
  tables
    return                = gt_bapireturn
  exceptions
    communication_failure = 1
    system_failure        = 2
    others                = 3.
if gt_bapireturn[] is initial.
  call function 'BAPI_TRANSACTION_COMMIT'
    exporting
      wait = gc_x.
else.
  loop at gt_bapireturn into gs_bapireturn
    where type = 'E'.
    message id gs_bapireturn-id type 'S'
    number gs_bapireturn-number with
    gs_bapireturn-message_v1
    gs_bapireturn-message_v2
    gs_bapireturn-message_v3
    gs_bapireturn-message_v4.
    exit.
  endloop.
endif.
MV50AFZ1, form USEREXIT_SAVE_DOCUMENT_PREPARE
data : ld_zzhuload   type erlkz.
if xlikp-vbtyp = 'J' " outbound delivery
and  t180-trtyp = 'V'. " Change
Memory-ID exported from program ZZZ...
import ld_zzhuload from MEMORY ID 'ZZHULOAD'.
  if sy-subrc is initial
  and not ld _zzhuload is initial.
    LOOP AT xlikp.
      xlikp-zzhuload = ld_zzhuload.
      MODIFY xlikp transporting zzhuload.
    ENDLOOP.
    free MEMORY ID 'ZZHULOAD'.
  endif.
endif.
I hope someone will find this helpful. Obviously I can not take responsibility for the functionality
Sorry for the format, I can not get the tags to work.....

Similar Messages

  • Question regarding use of Log and LogFactory in Servlets

    Hi,
    I saw the following code in an application and I would like to know where the log information would be stored. It appears that the log information is not displayed on the screen and was not able to find out where the log files are. The application was created using NetBeans and was using Tomcat. Thanks in advance.
    import org.apache.common.logging.*;
    public class Test extends HttpServlet
    private static final Log log = LogFactory.getLog(Test.class);
    String theHost;
    String theSource;
    public void init (ServletConfig config) throws ServletException
    super.init(config);
    log.info(�debug Enabled: �+log.isDebugEnabled());
    ServletContext context =config.getServletContext();
    this.thisHost=�/Test/�+config.getServletName();
    etc. etc.
    log.info(�thisHost:�+this.thisHost);
    log.debug(�Source:� +theSource());
    etc, etc.
    }

    It depends on what logging system you have set up.
    Commons.logging is an abstraction layer above logging components. It allows your code to use a variety of logging systems. However those logging systems have to be set up and configured by you. This can be via system properties, properties files, XML config files (depends on the logging system and how you use it).
    So you need to figure out which logging system is being used and then configue that system to write the logs
    matfud

  • Questions regarding using the .monitor command to retur a animated image and we would like feedback to a designed webpage that is monitoring a 5kW windturbine:)

    I'm embedding a front panel image in an existing HTML dokument. I would like to use the command .monitor in the URL together with the refresh command so the VI automatic will reload every 20 secund. This actual work, but simultaneous I want to have the possibility to refresh manually so I don't have to wait 20 sec before new values is shown in the display. Is this possible to do?
    Another question: Since the real time display updates 1-2 times a secund the command .monitor is used to get a animated picture of the Real Time Display.
    There are several ways to add animation on to web pages. The techniques used h
    ere are the �server push� and �client pull�which makes the browser repeatedly reloads a changing inline image to provide crude animated sequences. This is not the most efficient way as this result�s in an image being re-transmitted for each frame of the animation. The command .monitor with the attribute refresh and lifespan in the URL trigger this �server push� and �client pull� techniques.
    I use this automatic refresh uploading of the display so that it each time shows different values, is this called crude animation?Then I'm wondering what I'm suppose to use the command lifespan to?I can't see the use of it in my display.....?
    link to the webpage so you can have a look at the display:
    http://134.7.139.176/.monitor?Real%20Time%20Performance.vi&refresh=20
    This is a project that I'm working together with another Norwegian friend. WE are very happy for feedback on our web page and displays go to: http://www.ece.curtin.edu.au/~peersena/ if you would like to view itThanks

    Annis,
    One of the other things to keep in mind is that the generation of an image does take some computing power so having the generation and the acquistion on the same machine is not always ideal. If you're using the machine that is publishing the front panel just to collect data it's not so much of an issue.
    If you really want to monitor in "Real-Time" using Remote Panels (requies LabVIEW 6.1) is your best option. This posting has more information on using Remote Panels and links to some live examples:
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000C0660000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0&USEARCHCONTEXT_TIER_0=0&USEARCHCONTEXT_TIER_S=0&USEARCHCONTEXT_QUESTION_0=web+control&USEARCHCONTEXT_QUESTION_S=0
    Remote panels makes it possible to control the application remotely as well.
    With .monitor the only way I've been able to manually refresh is to "Shift+Refresh" on the browser.
    Regards,
    Kamran

  • Hello, I am a user of the iPhone is not the place for bi çıkıcak turkey apple brand products and product support and equipment does not work as it used to fix and send back waiting for your help. Please support me in this regard quit

    Hello, I am a user of the iPhone is not the place for bi çıkıcak turkey apple brand products and product support and equipment does not work as it used to fix and send back waiting for your help. Please support me in this regard quit

    We are all iphone users just like you.
    Do you have a question for fellow iphone users?

  • I am using Vista (64) and Photo Elemnts 7 to access.  When I try to load the "Editor" regarding any

    I am using Vista (64) and Photo Elemnts 7 to access.  When I try to load the “Editor” regarding any photos from “Organizer” I get the message “Runtime Error!
    Program:,,,,Adobe\Photoshop Elements 7.0\PhotoshopElementsEditor.exe
    This application has requested the Runtime to terminate it in an unusual way.
    Please contact the application's support team for more information.”

    You have the latest release version of Firefox, ignore those prompts from Yahoo about updating. They're trying to entice you to install their special "Yahoo enhanced" build of Firefox, that has extras which many people consider as being Malware.

  • I have an iphone 4, i connect it to my laptop using the usb and then when connecting to itunes it says my phone is not up to date with itunes yet i cannot find an update 11.1 for my phones itunes? someone please help me.. kind regards

    i have an iphone 4, i connect it to my laptop using the usb and then when connecting to itunes it says my phone is not up to date with itunes yet i cannot find an update 11.1 for my phones itunes? someone please help me.. kind regards

    Itunes 11.1 is for your computer, not your iphone
    It is required in order to sync with ios 7.

  • HT5934 Hi I am using iPhone 5 and not able to download ios7 update kindly help me in this regards

    Ho am using I phone 5. Not able to upgrade it to ios7

    Are you trying to update using a computer and iTunes, or are you trying to update using WiFi?

  • How we will use these Job_open and Job_submit job_close??

    Hi Experts,
    i am new in Developement, i need one help here my problem is
    I have one issue which is a report here i am getting the data into internal table, that data fetching i want to schedule it in background job..
    can any body tell me how can i use the JOB_OPEN and JOB_SUBMIT function modules....
    plz provide any example..
    Thanks in Advance,
    Venkat N

    Hi,
    Here is the sample program
    *Submit report as job(i.e. in background) 
    data: jobname like tbtcjob-jobname value
                                 ' TRANSFER TRANSLATION'.
    data: jobcount like tbtcjob-jobcount,
          host like msxxlist-host.
    data: begin of starttime.
            include structure tbtcstrt.
    data: end of starttime.
    data: starttimeimmediate like btch0000-char1.
    Job open
      call function 'JOB_OPEN'
           exporting
                delanfrep        = ' '
                jobgroup         = ' '
                jobname          = jobname
                sdlstrtdt        = sy-datum
                sdlstrttm        = sy-uzeit
           importing
                jobcount         = jobcount
           exceptions
                cant_create_job  = 01
                invalid_job_data = 02
                jobname_missing  = 03.
      if sy-subrc ne 0.
                                           "error processing
      endif.
    Insert process into job
    SUBMIT zreport and return
                    with p_param1 = 'value'
                    with p_param2 = 'value'
                    user sy-uname
                    via job jobname
                    number jobcount.
      if sy-subrc > 0.
                                           "error processing
      endif.
    Close job
      starttime-sdlstrtdt = sy-datum + 1.
      starttime-sdlstrttm = '220000'.
      call function 'JOB_CLOSE'
           exporting
                event_id             = starttime-eventid
                event_param          = starttime-eventparm
                event_periodic       = starttime-periodic
                jobcount             = jobcount
                jobname              = jobname
                laststrtdt           = starttime-laststrtdt
                laststrttm           = starttime-laststrttm
                prddays              = 1
                prdhours             = 0
                prdmins              = 0
                prdmonths            = 0
                prdweeks             = 0
                sdlstrtdt            = starttime-sdlstrtdt
                sdlstrttm            = starttime-sdlstrttm
                strtimmed            = starttimeimmediate
                targetsystem         = host
           exceptions
                cant_start_immediate = 01
                invalid_startdate    = 02
                jobname_missing      = 03
                job_close_failed     = 04
                job_nosteps          = 05
                job_notex            = 06
                lock_failed          = 07
                others               = 99.
      if sy-subrc eq 0.
                                           "error processing
      endif.
    Regards
    Sudheer

  • What is the real time use of implicit and explicit cursors in pl/sql

    what is the real time use of implicit and explicit cursors in pl/sql.............please tell me

    You can check the following link ->
    http://www.smart-soft.co.uk/Oracle/oracle-plsql-tutorial-part5.htm
    But, i've a question ->
    Are you student?
    Regards.
    Satyaki De.

  • I am using a Mac and when I save my files as a jpeg, the files become much smaller, and consequently darker and blurrier.  What can I do to fix this?

    I am using a Mac and when I save my files as a jpeg, the files become much smaller, and consequently darker and blurrier.  What can I do to fix this?  I have tried to figure out how to chat with someone at Adobe, but they certainly don't make it easy to do.  At the moment, this program is useless to me.  Very depressing....

    Hello,
    I would like to inform you that not all the browsers and online PDF readers support copying text from a PDF. If you have opened the PDF online, please download PDF file to your computer and then open the file in Adobe Reader.
    Please share a screenshot if the issue still persists.
    Regards,
    Nakul

  • Useful Interview Questions and Answere

    Hi All
    Some of the Real time question.
    Q) Under which menu path is the Test Workbench to be found, including in earlier Releases?
    The menu path is: Tools - ABAP Workbench - Test - Test Workbench.
    Q) I want to delete a BEx query that is in Production system through request. Is anyone aware about it?
    A) Have you tried the RSZDELETE transaction?
    Q) Errors while monitoring process chains.
    A) During data loading. Apart from them, in process chains you add so many process types, for example after loading data into Info Cube, you rollup data into aggregates, now this rolling up of data into aggregates is a process type which you keep after the process type for loading data into Cube. This rolling up into aggregates might fail.
    Another one is after you load data into ODS, you activate ODS data (another process type) this might also fail.
    Q) In Monitor----- Details (Header/Status/Details) à Under Processing (data packet): Everything OK à Context menu of Data Package 1 (1 Records): Everything OK -
    Simulate update. (Here we can debug update rules or transfer rules.)
    SM50 à Program/Mode à Program à Debugging & debug this work process.
    Q) PSA Cleansing.
    A) You know how to edit PSA. I don't think you can delete single records. You have to delete entire PSA data for a request.
    Q) Can we make a datasource to support delta.
    A) If this is a custom (user-defined) datasource you can make the datasource delta enabled. While creating datasource from RSO2, after entering datasource name and pressing create, in the next screen there is one button at the top, which says generic delta. If you want more details about this there is a chapter in Extraction book, it's in last pages u find out.
    Generic delta services: -
    Supports delta extraction for generic extractors according to:
    Time stamp
    Calendar day
    Numeric pointer, such as document number & counter
    Only one of these attributes can be set as a delta attribute.
    Delta extraction is supported for all generic extractors, such as tables/views, SAP Query and function modules
    The delta queue (RSA7) allows you to monitor the current status of the delta attribute
    Q) Workbooks, as a general rule, should be transported with the role.
    Here are a couple of scenarios:
    1. If both the workbook and its role have been previously transported, then the role does not need to be part of the transport.
    2. If the role exists in both dev and the target system but the workbook has never been transported, and then you have a choice of transporting the role (recommended) or just the workbook. If only the workbook is transported, then an additional step will have to be taken after import: Locate the WorkbookID via Table RSRWBINDEXT (in Dev and verify the same exists in the target system) and proceed to manually add it to the role in the target system via Transaction Code PFCG -- ALWAYS use control c/control v copy/paste for manually adding!
    3. If the role does not exist in the target system you should transport both the role and workbook. Keep in mind that a workbook is an object unto itself and has no dependencies on other objects. Thus, you do not receive an error message from the transport of 'just a workbook' -- even though it may not be visible, it will exist (verified via Table RSRWBINDEXT).
    Overall, as a general rule, you should transport roles with workbooks.
    Q) How much time does it take to extract 1 million (10 lackhs) of records into an infocube?
    A. This depends, if you have complex coding in update rules it will take longer time, or else it will take less than 30 minutes.
    Q) What are the five ASAP Methodologies?
    A: Project plan, Business Blue print, Realization, Final preparation & Go-Live - support.
    1. Project Preparation: In this phase, decision makers define clear project objectives and an efficient decision making process (i.e. Discussions with the client, like what are his needs and requirements etc.). Project managers will be involved in this phase (I guess).
    A Project Charter is issued and an implementation strategy is outlined in this phase.
    2. Business Blueprint: It is a detailed documentation of your company's requirements. (i.e. what are the objects we need to develop are modified depending on the client's requirements).
    3. Realization: In this only, the implementation of the project takes place (development of objects etc) and we are involved in the project from here only.
    4. Final Preparation: Final preparation before going live i.e. testing, conducting pre-go-live, end user training etc.
    End user training is given that is in the client site you train them how to work with the new environment, as they are new to the technology.
    5. Go-Live & support: The project has gone live and it is into production. The Project team will be supporting the end users.
    Q) What is landscape of R/3 & what is landscape of BW. Landscape of R/3 not sure.
    Then Landscape of b/w: u have the development system, testing system, production system
    Development system: All the implementation part is done in this sys. (I.e., Analysis of objects developing, modification etc) and from here the objects are transported to the testing system, but before transporting an initial test known as Unit testing (testing of objects) is done in the development sys.
    Testing/Quality system: quality check is done in this system and integration testing is done.
    Production system: All the extraction part takes place in this sys.
    Q) How do you measure the size of infocube?
    A: In no of records.
    Q). Difference between infocube and ODS?
    A: Infocube is structured as star schema (extended) where a fact table is surrounded by different dim table that are linked with DIM'ids. And the data wise, you will have aggregated data in the cubes. No overwrite functionality
    ODS is a flat structure (flat table) with no star schema concept and which will have granular data (detailed level). Overwrite functionality.
    Flat file datasources does not support 0recordmode in extraction.
    x before, -after, n new, a add, d delete, r reverse
    Q) Difference between display attributes and navigational attributes?
    A: Display attribute is one, which is used only for display purpose in the report. Where as navigational attribute is used for drilling down in the report. We don't need to maintain Navigational attribute in the cube as a characteristic (that is the advantage) to drill down.
    Q. SOME DATA IS UPLOADED TWICE INTO INFOCUBE. HOW TO CORRECT IT?
    A: But how is it possible? If you load it manually twice, then you can delete it by requestID.
    Q. CAN U ADD A NEW FIELD AT THE ODS LEVEL?
    Sure you can. ODS is nothing but a table.
    Q. CAN NUMBER OF DATASOURCES HAVE ONE INFOSOURCE?
    A) Yes of course. For example, for loading text and hierarchies we use different data sources but the same InfoSource.
    Q. BRIEF THE DATAFLOW IN BW.
    A) Data flows from transactional system to analytical system (BW). DataSources on the transactional system needs to be replicated on BW side and attached to infosource and update rules respectively.
    Q. CURRENCY CONVERSIONS CAN BE WRITTEN IN UPDATE RULES. WHY NOT IN TRANSFER RULES?
    Q) WHAT IS PROCEDURE TO UPDATE DATA INTO DATA TARGETS?
    FULL and DELTA.
    Q) AS WE USE Sbwnn, sbiw1, sbiw2 for delta update in LIS THEN WHAT IS THE PROCEDURE IN LO-COCKPIT?
    No LIS in LO cockpit. We will have datasources and can be maintained (append fields). Refer white paper on LO-Cockpit extractions.
    Q) Why we delete the setup tables (LBWG) & fill them (OLI*BW)?
    A) Initially we don't delete the setup tables but when we do change in extract structure we go for it. We r changing the extract structure right, that means there are some newly added fields in that which r not before. So to get the required data (i.e.; the data which is required is taken and to avoid redundancy) we delete n then fill the setup tables.
    To refresh the statistical data. The extraction set up reads the dataset that you want to process such as, customers orders with the tables like VBAK, VBAP) & fills the relevant communication structure with the data. The data is stored in cluster tables from where it is read when the initialization is run. It is important that during initialization phase, no one generates or modifies application data, at least until the tables can be set up.
    Q) SIGNIFICANCE of ODS?
    It holds granular data (detailed level).
    Q) WHERE THE PSA DATA IS STORED?
    In PSA table.
    Q) WHAT IS DATA SIZE?
    The volume of data one data target holds (in no. of records)
    Q) Different types of INFOCUBES.
    Basic, Virtual (remote, sap remote and multi)
    Virtual Cube is used for example, if you consider railways reservation all the information has to be updated online. For designing the Virtual cube you have to write the function module that is linking to table, Virtual cube it is like a the structure, when ever the table is updated the virtual cube will fetch the data from table and display report Online... FYI.. you will get the information : https://www.sdn.sap.com/sdn/index.sdn and search for Designing Virtual Cube and you will get a good material designing the Function Module
    Q) INFOSET QUERY.
    Can be made of ODS's and Characteristic InfoObjects with masterdata.
    Q) IF THERE ARE 2 DATASOURCES HOW MANY TRANSFER STRUCTURES ARE THERE.
    In R/3 or in BW? 2 in R/3 and 2 in BW
    Q) ROUTINES?
    Exist in the InfoObject, transfer routines, update routines and start routine
    Q) BRIEF SOME STRUCTURES USED IN BEX.
    Rows and Columns, you can create structures.
    Q) WHAT ARE THE DIFFERENT VARIABLES USED IN BEX?
    Different Variable's are Texts, Formulas, Hierarchies, Hierarchy nodes & Characteristic values.
    Variable Types are
    Manual entry /default value
    Replacement path
    SAP exit
    Customer exit
    Authorization
    Q) HOW MANY LEVELS YOU CAN GO IN REPORTING?
    You can drill down to any level by using Navigational attributes and jump targets.
    Q) WHAT ARE INDEXES?
    Indexes are data base indexes, which help in retrieving data fastly.
    Q) DIFFERENCE BETWEEN 2.1 AND 3.X VERSIONS.
    Help! Refer documentation
    Q) IS IT NESSESARY TO INITIALIZE EACH TIME THE DELTA UPDATE IS USED?
    No.
    Q) WHAT IS THE SIGNIFICANCE OF KPI'S?
    KPI's indicate the performance of a company. These are key figures
    Q) AFTER THE DATA EXTRACTION WHAT IS THE IMAGE POSITION.
    After image (correct me if I am wrong)
    Q) REPORTING AND RESTRICTIONS.
    Help! Refer documentation.
    Q) TOOLS USED FOR PERFORMANCE TUNING.
    ST22, Number ranges, delete indexes before load. Etc
    Q) PROCESS CHAINS: IF U has USED IT THEN HOW WILL U SCHEDULING DATA DAILY.
    There should be some tool to run the job daily (SM37 jobs)
    Q) AUTHORIZATIONS.
    Profile generator
    Q) WEB REPORTING.
    What are you expecting??
    Q) CAN CHARECTERSTIC INFOOBJECT CAN BE INFOPROVIDER.
    Of course
    Q) PROCEDURES OF REPORTING ON MULTICUBES
    Refer help. What are you expecting? MultiCube works on Union condition
    Q) EXPLAIN TRANPSORTATION OF OBJECTS?
    Dev-àQ and Dev-----àP
    Q) What types of partitioning are there for BW?
    There are two Partitioning Performance aspects for BW (Cube & PSA)
    Query Data Retrieval Performance Improvement:
    Partitioning by (say) Date Range improves data retrieval by making best use of database execution plans and indexes (of say Oracle database engine).
    B) Transactional Load Partitioning Improvement:
    Partitioning based on expected load volumes and data element sizes. Improves data loading into PSA and Cubes by infopackages (Eg. without timeouts).
    Q) How can I compare data in R/3 with data in a BW Cube after the daily delta loads? Are there any standard procedures for checking them or matching the number of records?
    A) You can go to R/3 TCode RSA3 and run the extractor. It will give you the number of records extracted. Then go to BW Monitor to check the number of records in the PSA and check to see if it is the same & also in the monitor header tab.
    A) RSA3 is a simple extractor checker program that allows you to rule out extracts problems in R/3. It is simple to use, but only really tells you if the extractor works. Since records that get updated into Cubes/ODS structures are controlled by Update Rules, you will not be able to determine what is in the Cube compared to what is in the R/3 environment. You will need to compare records on a 1:1 basis against records in R/3 transactions for the functional area in question. I would recommend enlisting the help of the end user community to assist since they presumably know the data.
    To use RSA3, go to it and enter the extractor ex: 2LIS_02_HDR. Click execute and you will see the record count, you can also go to display that data. You are not modifying anything so what you do in RSA3 has no effect on data quality afterwards. However, it will not tell you how many records should be expected in BW for a given load. You have that information in the monitor RSMO during and after data loads. From RSMO for a given load you can determine how many records were passed through the transfer rules from R/3, how many targets were updated, and how many records passed through the Update Rules. It also gives you error messages from the PSA.
    Q) Types of Transfer Rules?
    A) Field to Field mapping, Constant, Variable & routine.
    Q) Types of Update Rules?
    A) (Check box), Return table
    Q) Transfer Routine?
    A) Routines, which we write in, transfer rules.
    Q) Update Routine?
    A) Routines, which we write in Update rules
    Q) What is the difference between writing a routine in transfer rules and writing a routine in update rules?
    A) If you are using the same InfoSource to update data in more than one data target its better u write in transfer rules because u can assign one InfoSource to more than one data target & and what ever logic u write in update rules it is specific to particular one data target.
    Q) Routine with Return Table.
    A) Update rules generally only have one return value. However, you can create a routine in the tab strip key figure calculation, by choosing checkbox Return table. The corresponding key figure routine then no longer has a return value, but a return table. You can then generate as many key figure values, as you like from one data record.
    Q) Start routines?
    A) Start routines u can write in both updates rules and transfer rules, suppose you want to restrict (delete) some records based on conditions before getting loaded into data targets, then you can specify this in update rules-start routine.
    Ex: - Delete Data_Package ani ante it will delete a record based on the condition
    Q) X & Y Tables?
    X-table = A table to link material SIDs with SIDs for time-independent navigation attributes.
    Y-table = A table to link material SIDs with SIDS for time-dependent navigation attributes.
    There are four types of sid tables
    X time independent navigational attributes sid tables
    Y time dependent navigational attributes sid tables
    H hierarchy sid tables
    I hierarchy structure sid tables
    Q) Filters & Restricted Key figures (real time example)
    Restricted KF's u can have for an SD cube: billed quantity, billing value, no: of billing documents as RKF's.
    Q) Line-Item Dimension (give me an real time example)
    Line-Item Dimension: Invoice no: or Doc no: is a real time example
    Q) What does the number in the 'Total' column in Transaction RSA7 mean?
    A) The 'Total' column displays the number of LUWs that were written in the delta queue and that have not yet been confirmed. The number includes the LUWs of the last delta request (for repetition of a delta request) and the LUWs for the next delta request. A LUW only disappears from the RSA7 display when it has been transferred to the BW System and a new delta request has been received from the BW System.
    Q) How to know in which table (SAP BW) contains Technical Name / Description and creation data of a particular Reports. Reports that are created using BEx Analyzer.
    A) There is no such table in BW if you want to know such details while you are opening a particular query press properties button you will come to know all the details that you wanted.
    You will find your information about technical names and description about queries in the following tables. Directory of all reports (Table RSRREPDIR) and Directory of the reporting component elements (Table RSZELTDIR) for workbooks and the connections to queries check Where- used list for reports in workbooks (Table RSRWORKBOOK) Titles of Excel Workbooks in InfoCatalog (Table RSRWBINDEXT)
    Q) What is a LUW in the delta queue?
    A) A LUW from the point of view of the delta queue can be an individual document, a group of documents from a collective run or a whole data packet of an application extractor.
    Q) Why does the number in the 'Total' column in the overview screen of Transaction RSA7 differ from the number of data records that is displayed when you call the detail view?
    A) The number on the overview screen corresponds to the total of LUWs (see also first question) that were written to the qRFC queue and that have not yet been confirmed. The detail screen displays the records contained in the LUWs. Both, the records belonging to the previous delta request and the records that do not meet the selection conditions of the preceding delta init requests are filtered out. Thus, only the records that are ready for the next delta request are displayed on the detail screen. In the detail screen of Transaction RSA7, a possibly existing customer exit is not taken into account.
    Q) Why does Transaction RSA7 still display LUWs on the overview screen after successful delta loading?
    A) Only when a new delta has been requested does the source system learn that the previous delta was successfully loaded to the BW System. Then, the LUWs of the previous delta may be confirmed (and also deleted). In the meantime, the LUWs must be kept for a possible delta request repetition. In particular, the number on the overview screen does not change when the first delta was loaded to the BW System.
    Q) Why are selections not taken into account when the delta queue is filled?
    A) Filtering according to selections takes place when the system reads from the delta queue. This is necessary for reasons of performance.
    Q) Why is there a DataSource with '0' records in RSA7 if delta exists and has also been loaded successfully?
    It is most likely that this is a DataSource that does not send delta data to the BW System via the delta queue but directly via the extractor (delta for master data using ALE change pointers). Such a DataSource should not be displayed in RSA7. This error is corrected with BW 2.0B Support Package 11.
    Q) Do the entries in table ROIDOCPRMS have an impact on the performance of the loading procedure from the delta queue?
    A) The impact is limited. If performance problems are related to the loading process from the delta queue, then refer to the application-specific notes (for example in the CO-PA area, in the logistics cockpit area and so on).
    Caution: As of Plug In 2000.2 patch 3 the entries in table ROIDOCPRMS are as effective for the delta queue as for a full update. Please note, however, that LUWs are not split during data loading for consistency reasons. This means that when very large LUWs are written to the DeltaQueue, the actual package size may differ considerably from the MAXSIZE and MAXLINES parameters.
    Q) Why does it take so long to display the data in the delta queue (for example approximately 2 hours)?
    A) With Plug In 2001.1 the display was changed: the user has the option of defining the amount of data to be displayed, to restrict it, to selectively choose the number of a data record, to make a distinction between the 'actual' delta data and the data intended for repetition and so on.
    Q) What is the purpose of function 'Delete data and meta data in a queue' in RSA7? What exactly is deleted?
    A) You should act with extreme caution when you use the deletion function in the delta queue. It is comparable to deleting an InitDelta in the BW System and should preferably be executed there. You do not only delete all data of this DataSource for the affected BW System, but also lose the entire information concerning the delta initialization. Then you can only request new deltas after another delta initialization.
    When you delete the data, the LUWs kept in the qRFC queue for the corresponding target system are confirmed. Physical deletion only takes place in the qRFC outbound queue if there are no more references to the LUWs.
    The deletion function is for example intended for a case where the BW System, from which the delta initialization was originally executed, no longer exists or can no longer be accessed.
    Q) Why does it take so long to delete from the delta queue (for example half a day)?
    A) Import PlugIn 2000.2 patch 3. With this patch the performance during deletion is considerably improved.
    Q) Why is the delta queue not updated when you start the V3 update in the logistics cockpit area?
    A) It is most likely that a delta initialization had not yet run or that the delta initialization was not successful. A successful delta initialization (the corresponding request must have QM status 'green' in the BW System) is a prerequisite for the application data being written in the delta queue.
    Q) What is the relationship between RSA7 and the qRFC monitor (Transaction SMQ1)?
    A) The qRFC monitor basically displays the same data as RSA7. The internal queue name must be used for selection on the initial screen of the qRFC monitor. This is made up of the prefix 'BW, the client and the short name of the DataSource. For DataSources whose name are 19 characters long or shorter, the short name corresponds to the name of the DataSource. For DataSources whose name is longer than 19 characters (for delta-capable DataSources only possible as of PlugIn 2001.1) the short name is assigned in table ROOSSHORTN.
    In the qRFC monitor you cannot distinguish between repeatable and new LUWs. Moreover, the data of a LUW is displayed in an unstructured manner there.
    Q) Why are the data in the delta queue although the V3 update was not started?
    A) Data was posted in background. Then, the records are updated directly in the delta queue (RSA7). This happens in particular during automatic goods receipt posting (MRRS). There is no duplicate transfer of records to the BW system. See Note 417189.
    Q) Why does button 'Repeatable' on the RSA7 data details screen not only show data loaded into BW during the last delta but also data that were newly added, i.e. 'pure' delta records?
    A) Was programmed in a way that the request in repeat mode fetches both actually repeatable (old) data and new data from the source system.
    Q) I loaded several delta inits with various selections. For which one is the delta loaded?
    A) For delta, all selections made via delta inits are summed up. This means, a delta for the 'total' of all delta initializations is loaded.
    Q) How many selections for delta inits are possible in the system?
    A) With simple selections (intervals without complicated join conditions or single values), you can make up to about 100 delta inits. It should not be more.
    With complicated selection conditions, it should be only up to 10-20 delta inits.
    Reason: With many selection conditions that are joined in a complicated way, too many 'where' lines are generated in the generated ABAP source code that may exceed the memory limit.
    Q) I intend to copy the source system, i.e. make a client copy. What will happen with may delta? Should I initialize again after that?
    A) Before you copy a source client or source system, make sure that your deltas have been fetched from the DeltaQueue into BW and that no delta is pending. After the client copy, an inconsistency might occur between BW delta tables and the OLTP delta tables as described in Note 405943. After the client copy, Table ROOSPRMSC will probably be empty in the OLTP since this table is client-independent. After the system copy, the table will contain the entries with the old logical system name that are no longer useful for further delta loading from the new logical system. The delta must be initialized in any case since delta depends on both the BW system and the source system. Even if no dump 'MESSAGE_TYPE_X' occurs in BW when editing or creating an InfoPackage, you should expect that the delta have to be initialized after the copy.
    Q) Is it allowed in Transaction SMQ1 to use the functions for manual control of processes?
    A) Use SMQ1 as an instrument for diagnosis and control only. Make changes to BW queues only after informing the BW Support or only if this is explicitly requested in a note for component 'BC-BW' or 'BW-WHM-SAPI'.
    Q) Despite of the delta request being started after completion of the collective run (V3 update), it does not contain all documents. Only another delta request loads the missing documents into BW. What is the cause for this "splitting"?
    A) The collective run submits the open V2 documents for processing to the task handler, which processes them in one or several parallel update processes in an asynchronous way. For this reason, plan a sufficiently large "safety time window" between the end of the collective run in the source system and the start of the delta request in BW. An alternative solution where this problem does not occur is described in Note 505700.
    Q) Despite my deleting the delta init, LUWs are still written into the DeltaQueue?
    A) In general, delta initializations and deletions of delta inits should always be carried out at a time when no posting takes place. Otherwise, buffer problems may occur: If a user started the internal mode at a time when the delta initialization was still active, he/she posts data into the queue even though the initialization had been deleted in the meantime. This is the case in your system.
    Q) In SMQ1 (qRFC Monitor) I have status 'NOSEND'. In the table TRFCQOUT, some entries have the status 'READY', others 'RECORDED'. ARFCSSTATE is 'READ'. What do these statuses mean? Which values in the field 'Status' mean what and which values are correct and which are alarming? Are the statuses BW-specific or generally valid in qRFC?
    A) Table TRFCQOUT and ARFCSSTATE: Status READ means that the record was read once either in a delta request or in a repetition of the delta request. However, this does not mean that the record has successfully reached the BW yet. The status READY in the TRFCQOUT and RECORDED in the ARFCSSTATE means that the record has been written into the DeltaQueue and will be loaded into the BW with the next delta request or a repetition of a delta. In any case only the statuses READ, READY and RECORDED in both tables are considered to be valid. The status EXECUTED in TRFCQOUT can occur temporarily. It is set before starting a DeltaExtraction for all records with status READ present at that time. The records with status EXECUTED are usually deleted from the queue in packages within a delta request directly after setting the status before extracting a new delta. If you see such records, it means that either a process which is confirming and deleting records which have been loaded into the BW is successfully running at the moment, or, if the records remain in the table for a longer period of time with status EXECUTED, it is likely that there are problems with deleting the records which have already been successfully been loaded into the BW. In this state, no more deltas are loaded into the BW. Every other status is an indicator for an error or an inconsistency. NOSEND in SMQ1 means nothing (see note 378903).
    The value 'U' in field 'NOSEND' of table TRFCQOUT is discomforting.
    Q) The extract structure was changed when the DeltaQueue was empty. Afterwards new delta records were written to the DeltaQueue. When loading the delta into the PSA, it shows that some fields were moved. The same result occurs when the contents of the DeltaQueue are listed via the detail display. Why are the data displayed differently? What can be done?
    Make sure that the change of the extract structure is also reflected in the database and that all servers are synchronized. We recommend to reset the buffers using Transaction $SYNC. If the extract structure change is not communicated synchronously to the server where delta records are being created, the records are written with the old structure until the new structure has been generated. This may have disastrous consequences for the delta.
    When the problem occurs, the delta needs to be re-initialized.
    Q) How and where can I control whether a repeat delta is requested?
    A) Via the status of the last delta in the BW Request Monitor. If the request is RED, the next load will be of type 'Repeat'. If you need to repeat the last load for certain reasons, set the request in the monitor to red manually. For the contents of the repeat see Question 14. Delta requests set to red despite of data being already updated lead to duplicate records in a subsequent repeat, if they have not been deleted from the data targets concerned before.
    Q) As of PI 2003.1, the Logistic Cockpit offers various types of update methods. Which update method is recommended in logistics? According to which criteria should the decision be made? How can I choose an update method in logistics?
    See the recommendation in Note 505700.
    Q) Are there particular recommendations regarding the data volume the DeltaQueue may grow to without facing the danger of a read failure due to memory problems?
    A) There is no strict limit (except for the restricted number range of the 24-digit QCOUNT counter in the LUW management table - which is of no practical importance, however - or the restrictions regarding the volume and number of records in a database table).
    When estimating "smooth" limits, both the number of LUWs is important and the average data volume per LUW. As a rule, we recommend to bundle data (usually documents) already when writing to the DeltaQueue to keep number of LUWs small (partly this can be set in the applications, e.g. in the Logistics Cockpit). The data volume of a single LUW should not be considerably larger than 10% of the memory available to the work process for data extraction (in a 32-bit architecture with a memory volume of about 1GByte per work process, 100 Mbytes per LUW should not be exceeded). That limit is of rather small practical importance as well since a comparable limit already applies when writing to the DeltaQueue. If the limit is observed, correct reading is guaranteed in most cases.
    If the number of LUWs cannot be reduced by bundling application transactions, you should at least make sure that the data are fetched from all connected BWs as quickly as possible. But for other, BW-specific, reasons, the frequency should not be higher than one DeltaRequest per hour.
    To avoid memory problems, a program-internal limit ensures that never more than 1 million LUWs are read and fetched from the database per DeltaRequest. If this limit is reached within a request, the DeltaQueue must be emptied by several successive DeltaRequests. We recommend, however, to try not to reach that limit but trigger the fetching of data from the connected BWs already when the number of LUWs reaches a 5-digit value.
    Q) I would like to display the date the data was uploaded on the report. Usually, we load the transactional data nightly. Is there any easy way to include this information on the report for users? So that they know the validity of the report.
    A) If I understand your requirement correctly, you want to display the date on which data was loaded into the data target from which the report is being executed. If it is so, configure your workbook to display the text elements in the report. This displays the relevance of data field, which is the date on which the data load has taken place.
    Q) Can we filter the fields at Transfer Structure?
    Q) Can we load data directly into infoobject with out extraction is it possible.
    Yes. We can copy from other infoobject if it is same. We load data from PSA if it is already in PSA.
    Q) HOW MANY DAYS CAN WE KEEP THE DATA IN PSA, IF WE R SHEDULED DAILY, WEEKLY AND MONTHLY.
    a) We can set the time.
    Q) HOW CAN U GET THE DATA FROM CLIENT IF U R WORKING ON OFFSHORE PROJECTS. THROUGH WHICH NETWORK.
    a) VPN…………….Virtual Private Network, VPN is nothing but one sort of network where we can connect to the client systems sitting in offshore through RAS (Remote access server).
    Q) HOW CAN U ANALIZE THE PROJECT AT FIRST?
    Prepare Project Plan and Environment
    Define Project Management Standards and
    Procedures
    Define Implementation Standards and Procedures
    Testing & Go-live + supporting.
    Q) THERE is one ODS AND 4 INFOCUBES. WE SEND DATA AT TIME TO ALL CUBES IF ONE CUBE GOT LOCK ERROR. HOW CAN U RECTIFY THE ERROR?
    Go to TCode sm66 then see which one is locked select that pid from there and goto sm12
    TCode then unlock it this is happened when lock errors are occurred when u scheduled.
    Q) Can anybody tell me how to add a navigational attribute in the BEx report in the rows?
    A) Expand dimension under left side panel (that is infocube panel) select than navigational attributes drag and drop under rows panel.
    Q) IF ANY TRASACTION CODE LIKE SMPT OR STMT.
    In current systems (BW 3.0B and R/3 4.6B) these Tcodes don't exist!
    Q) WHAT IS TRANSACTIONAL CUBE?
    A) Transactional InfoCubes differ from standard InfoCubes in that the former have an improved write access performance level. Standard InfoCubes are technically optimized for read-only access and for a comparatively small number of simultaneous accesses. Instead, the transactional InfoCube was developed to meet the demands of SAP Strategic Enterprise Management (SEM), meaning that, data is written to the InfoCube (possibly by several users at the same time) and re-read as soon as possible. Standard Basic cubes are not suitable for this.
    Q) Is there any way to delete cube contents within update rules from an ODS data source? The reason for this would be to delete (or zero out) a cube record in an "Open Order" cube if the open order quantity was 0.
    I've tried using the 0recordmode but that doesn't work. Also, would it
    be easier to write a program that would be run after the load and delete
    the records with a zero open qty?
    A) START routine for update rules u can write ABAP code.
    A) Yap, you can do it. Create a start routine in Update rule.
    It is not "Deleting cube contents with update rules" It is only possible to avoid that some content is updated into the InfoCube using the start routine. Loop at all the records and delete the record that has the condition. "If the open order quantity was 0" You have to think also in before and after images in case of a delta upload. In that case you may delete the change record and keep the old and after the change the wrong information.
    Q) I am not able to access a node in hierarchy directly using variables for reports. When I am using Tcode RSZV it is giving a message that it doesn't exist in BW 3.0 and it is embedded in BEx. Can any one tell me the other options to get the same functionality in BEx?
    A) Tcode RSZV is used in the earlier version of 3.0B only. From 3.0B onwards, it's possible in the Query Designer (BEx) itself. Just right click on the InfoObject for which you want to use as variables and precede further selecting variable type and processing types.
    Q) Wondering how can I get the values, for an example, if I run a report for month range 01/2004 - 10/2004 then monthly value is actually divide by the number of months that I selected. Which variable should I use?
    Q) Why is it every time I switch from Info Provider to InfoObject or from one item to another while in modeling I always get this message " Reading Data " or "constructing workbench" in it runs for minutes.... anyway to stop this?
    Q) Can any one give me info on how the BW delta works also would like to know about 'before image and after image' am currently in a BW project and have to write start routines for delta load.
    Q) I am very new to BW. I would like to clarify a doubt regarding Delta extractor. If I am correct, by using delta extractors the data that has already been scheduled will not be uploaded again. Say for a specific scenario, Sales. Now I have uploaded all the sales order created till yesterday into the cube. Now say I make changes to any of the open record, which was already uploaded. Now what happens when I schedule it again? Will the same record be uploaded again with the changes or will the changes get affected to the previous record.
    A)
    Q) In BW we need to write abap routines. I wish to know when and what type of abap routines we got to write. Also, are these routines written in update rules? I will be glad, if this is clarified with real-time scenarios and few examples?
    A) Over here we write our routines in the start routines in the update rules or in the transfer structure (you can choose between writing them in the start routines or directly behind the different characteristics. In the transfer structure you just click on the yellow triangle behind a characteristic and choose "routine". In the update rules you can choose "start routine" or click on the triangle with the green square behind an individual characteristic. Usually we only use start routine when it does not concern one single characteristic (for example when you have to read the same table for 4 characteristics). I hope this helps.
    We used ABAP Routines for example:
    To convert to Uppercase (transfer structure)
    To convert Values out of a third party tool with different keys into the same keys as our SAP System uses (transfer structure)
    To select only a part of the data for from an infosource updating the InfoCube (Start Routine) etc.
    Q) What is ODS?
    A) An ODS object acts as a storage location for consolidated and cleaned-up transaction data (transaction data or master data, for example) on the document (atomic) level.
    This data can be evaluated using a BEx query.
    Standard ODS Object
    Transactional ODS object:
    The data is immediately available here for reporting. For implementation, compare with the Transactional ODS Object.
    A transactional ODS object differs from a standard ODS object in the way it prepares data. In a standard ODS object, data is stored in different versions ((new) delta, active, (change log) modified), where as a transactional ODS object contains the data in a single version. Therefore, data is stored in precisely the same form in which it was written to the transactional ODS object by the application. In BW, you can use a transaction ODS object as a data target for an analysis process.
    The transactional ODS object is also required by diverse applications, such as SAP Strategic Enterprise Management (SEM) for example, as well as other external applications.
    Transactional ODS objects allow data to be available quickly. The data from this kind of ODS object is accessed transactionally, that is, data is written to the ODS object (possibly by several users at the same time) and reread as soon as possible.
    It offers no replacement for the standard ODS object. Instead, an additional function displays those that can be used for special applications.
    The transactional ODS object simply consists of a table for active data. It retrieves its data from external systems via fill- or delete- APIs. The loading process is not supported by the BW system. The advantage to the way it is structured is that data is easy to access. They are made available for reporting immediately after being loaded.
    Q) What does InfoCube contains?
    A) Each InfoCube has one FactTable & a maximum of 16 (13+3 system defined, time, unit & data packet) dimensions.
    Q) What does FACT Table contain?
    A FactTable consists of KeyFigures.
    Each Fact Table can contain a maximum of 233 key figures.
    Dimension can contain up to 248 freely available characteristics.
    Q) How many dimensions are in a CUBE?
    A) 16 dimensions. (13 user defined & 3 system pre-defined )
    Q) What does SID Table contain?
    SID keys linked with dimension table & master data tables (attributes, texts, hierarchies)
    Q) What does ATTRIBUTE Table contain?
    Master attribute data
    Q) What does TEXT Table contain?
    Master text data, short text, long text, medium text & language key if it is language dependent
    Q) What does Hierarchy table contain?

    Hi DST
    This is a great effort and gesture. thank you on behalf of all the newbies.
    PJ

  • Report using Tabular Model and Measures based on Distinct Counts

    Hello,
    I am creating a report that should present something like this:
    YEAR-1 | MONTH-1 | MONTH-2 | MONTH-3... | YEAR | MONTH-1 | MONTH-2 | MONTH-3...
    My problem is that when designing the dataset to support this layout I drag the Year, Month and Distinct count Measure, but on the report when I want the value for the YEAR level I don't have it and I cannot sum the months value...
    What is the best aproach to solve this? Do I really have to go to advanced mode and customize my MDX or DAX? Can't basic users do something like this that seems so trivial and needed?
    Thank you
    Luis Simões

    Hi Luis,
    According to your description, you create a Reporting Services report using Analysis Service Tabular Model as the datasource, now what you want is sum the months value on year level, right?
    In your scenario, you can add the Month field to column group, add a parent group using Year Field and then add a Total on Month group. In this case, Reporting Services will sum the months value on Year level. I have tested it on my local environment, the
    screenshot below is for you reference.
    Reference:Lesson 6: Adding Grouping and Totals (Reporting Services)
    If this is not what you want, please describe your dataset structure, so that we can make further analysis.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Can we use both INSERT and UPDATE at the same time in JDBC Receiver

    Hi All,
    I would like to know is it possible to use both INSERT and UPDATE at the same time in one interface because I have a requirement in which I have to perform both the task.
    user send the file which contains both new and old record and I need to save those in MS SQL database.
    If the record exist then use UPDATE otherwise use INSERT.
    I looked on sdn but didn't find any blog which perform both the things at the same time.
    Interface Requirement
    FILE -
    > PI -
    > JDBC(INSERT & UPDATE)
    I am thinking to use JDBC Lookup but not sure if it good to use for bulk record.
    Can somebody please suggest me something or send me the link of any blog or anything to solve this problem.
    Thanks,

    Hi ,
              If I have understood properly the scenario properly,you are not performing insert and update together. As you posted
    "If the record exist then use UPDATE otherwise use INSERT."
    Thus you are performing either an insert or an update which depends on outcome of a search if the records already exist in database or not. Obviously to search the tables you need " select * from ...  where ...." query. If your query returns some results you proceed with update since this means there are some old records already in database. If your query returns no rows  you proceed with "insert into tablename....." since there are no old records present in database.
      Now perhaps the best method to do the searching, taking a decision to insert or update, and finally insert or update operation is to be done by a stored procedure in MS SQL database.  A stored procedure is a subroutine available to applications accessing a relational database system. Here the application is PI server.   If you need further help on how to write and call stored procedure in MS SQL you can look into these links
    http://www.daniweb.com/web-development/databases/ms-sql/threads/146829
    http://www.sqlteam.com/article/stored-procedures-parameters-inserts-and-updates
    [ This part you can ignore, Since its not sure that you will face this situation
        Still you might face some problems while your scenario runs. Lets consider this scenario, after the stored procedure searches the database it found no rows. Thus you proceed with an insert operation. If your database table is being accessed by multiple applications (or users) other than yours then it is very well possible that after the search operation completed with a null result, an insert/update operation has been performed by some other application with the same primary key. Now when you are trying to insert another row with same primary key you get an error message like "duplicate entry not possible for same primary key value". Thus you need to be careful in this respect. MS SQL has a feature called "exclusive locks ". Look into these links for more details on the subject
    http://msdn.microsoft.com/en-us/library/aa213039(v=sql.80).aspx
    http://www.mssqlcity.com/Articles/Adm/SQL70Locks.htm
    http://www.faqs.org/docs/ppbook/r27479.htm
    http://msdn.microsoft.com/en-US/library/ms187373.aspx
    http://msdn.microsoft.com/en-US/library/ms173763.aspx
    http://msdn.microsoft.com/en-us/library/e7z8d5hf(v=vs.80).aspx
    http://mssqlserver.wordpress.com/2006/11/08/locks-in-sql/
    http://www.mollerus.net/tom/blog/2008/03/using_mssqls_nolock_for_faster_queries.html
        There must be other methods to avoid this problem. But the point is you need to be sure that all access to database for insert/update operations are isolated.
    regards
    Anupam

  • The application does not use the  screen and run in the background

    Hi
    I have downloaded a package of j2me Midlet
    from [link] here [link]
    and try to reuse the code
    but I get the following error when running the code:-
    The application does not use the screen and run in the background
    I think the error into one of these two classes
    package main;
    import javax.microedition.midlet.*;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.media.Manager;
    import javax.microedition.media.MediaException;
    import javax.microedition.media.Player;
    import java.io.IOException;
    import java.io.InputStream;
    public class MainMidlet extends MIDlet implements CommandListener {
        private SSGameCanvas gameCanvas ;
        private Command exitCommand ;
        private Player player = null;
        public void startApp() {
      try {
           //   create new game thread
              gameCanvas = new SSGameCanvas();
              gameCanvas.start(); // start game thread
              exitCommand = new Command("Exit",Command.EXIT,1);
              gameCanvas.addCommand(exitCommand);
              gameCanvas.setCommandListener(this);
                Display.getDisplay(this).setCurrent(gameCanvas);
       catch (java.io.IOException e)
                e.printStackTrace();
            try {
                // start sounds
                InputStream in = getClass().getResourceAsStream("/resource/startfly.wav");
                player = Manager.createPlayer(in,"audio/x-wav");
                player.setLoopCount(1);
                player.start();
            catch (MediaException ex)
                ex.printStackTrace();
             catch (IOException ex)
                ex.printStackTrace();
        public void pauseApp() {
        public void destroyApp(boolean unconditional) {
            if (player != null) {
                player.close();
            System.gc();
      public void commandAction(Command command, Displayable displayable) {
           if (command == exitCommand)
                 destroyApp(true);
                 notifyDestroyed();
    package main;
    import java.io.IOException;
    import javax.microedition.lcdui.*;
    import javax.microedition.lcdui.game.*;
    public class SSGameCanvas extends GameCanvas implements Runnable {
        protected GameManager gameManager;
        protected boolean running;
        private int tick=0;
        private static int WIDTH;
        private static int HEIGHT;
        private int mDelay = 20;
        Form mainForm;
        Display display;
        //private int MaxTime;
        public SSGameCanvas() throws IOException{
            super(true);
            gameManager = new GameManager(5,5,getHeight()-10,getWidth()-10,this);
        public void start() {
                this.running = true;
                Thread t = new Thread(this);
                t.start();
        public void stop() {
            running = false;
        public void render(Graphics g) {
            WIDTH = getWidth();
            HEIGHT = getHeight();
            // Clear the Canvas.
            g.setColor(0, 0, 50);
            g.fillRect(0,0,WIDTH-1,HEIGHT-1);
            // draw border
            g.setColor(200,0,0);
            g.drawRect(0,0,WIDTH-1,HEIGHT-1);
            // draw game canvas
            gameManager.paint(g);
        public void run() {
            while (running) {
                // draw graphics
                render(getGraphics());
                // advance to next graphics
                advance(tick++);
                // display
                flushGraphics();
                try { Thread.sleep(mDelay); }
                catch (InterruptedException ie) {}
        public void advance(int ticks) {
            // advance to next game canvas
            gameManager.advance(ticks);
            this.paint(getGraphics());
    }Edited by: VANPERSIE on Jul 10, 2012 12:26 PM

    Hi Andi,
    Thanks for your reply.
    Yes, I have waited for a while and the result doesn't change.
    The Porblem here is the application is seen started in visual administrator.Only restart brings up the page back.
    Can you please suggest anything.
    Thanks and regards
    Nagaraj

  • Customizing FD01 and FB70 using PS Class and Characteristics

    Hello SAP Experts
    I have the following issue:
    My client has a requirement where we need to customize the Customer Master  (FD01) screen and the Invoice Posting Screen (FB70). A few additional fields have to be added by creating a separate tab. I was intending to take Abaper's help and do this using user exits but I have been suggested by the cleint to use SAP PS Class and Characteristics feature to do this. Can someone please throw some light on this feature and how can i create custom fields on FD01 and FB70 screens. Is there a way we could customize these screens using PS class and characteristics. Your opinions would be much appreciated.
    Please kindly give your suggestions. Thanks in advance
    Regards,
    Nik

    Joao Paulo,
    Thank you for the response. I have tried to obtain some info from OSS but no luck. Tried all means but there is limited information available.
    Nik

Maybe you are looking for