Retrival of BDC data

Hi,
Is that possible to extract the file that has been uploaded via BDC. Let me know the optimum way to get this file out (any format) or atleast the path of the file that we gave while uploading.  And also it should have the details of uploading time and date.
If this can be done? Thanks in advance.
Regards,
Raj.

Hi Raj,
Please note that after you have executed the BDC session, you cannot view the exact file that you have used for uploading the data.
The best you can do after executing a session is make necessary corrections to the session; for a short description on correcting BDC sessions, check this link - [Session Correction (admin activity)|http://help.sap.com/saphelp_46c/helpdata/EN/69/c250684ba111d189750000e8322d00/content.htm].
But you can surely take a backup of the uploaded file before the session is created. Suppose you are using cl_gui_frontend_services=>gui_upload for uploading your file. Immediately after the function, you can save the file either to a local file system, or persistently for later access.
Saving the file is thru the method cli_gui_frontend_services=>gui_download. For persistently saving the file, use a persistent class. Here is a [short tutorial on using persistent classes|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/06/f23c3d638d11d4966d00a0c94260a5/content.htm].
You can also save the path entered by the user from your selection screen. Just copy the path entered and save in a Z-table along with date and time (and any other details etc.)
As for uploading date and time, you can use the standard timestamp features of SAP. For more info, refer to the following links:
[Fetching timestamps|http://help.sap.com/abapdocu_70/en/ABAPGET_TIME-STAMP.htm]
[Converting timestamps|http://help.sap.com/abapdocu_70/en/ABAPCONVERT_TIME-STAMP.htm]
Hope this helps! Do let me know if you need anything else!!
Cheers,
Shailesh.

Similar Messages

  • RETRIVAL OF TIME DATA

    i have used logical data base pnp but in internal table zl it is not returning any data so output data is not displayng.
    can anybody help me in retriving the time data?
    plz see the code and let me know what i have to change so that i can retrive ZL TABLE(B2 CLUSTER).........
    Plz help me urgently
    TABLES:pernr,pc2bf.
    DATA: it_t549q TYPE t549q OCCURS 0 WITH HEADER LINE,
           it_zl TYPE pc2bf OCCURS 0 WITH HEADER LINE.
    DATA:w_begda LIKE sy-datum,
          w_pernr LIKE pernr-pernr.
    w_begda = '20010101'.
    DATA:BEGIN OF it_zl1 OCCURS 0,
         lgart LIKE pc2bf-lgart,
         iftyp LIKE pc2bf-iftyp,
         anzhl LIKE pc2bf-iftyp,
         END OF it_zl1.
    GET pernr.
    move pernr-pernr to w_pernr.
      CALL FUNCTION 'HR_PAYROLL_PERIODS_GET'
        EXPORTING
          get_begda       = w_begda
        TABLES
          get_periods     = it_t549q
        EXCEPTIONS
          no_period_found = 1
          no_valid_permo  = 2.
      CHECK sy-subrc = 0.
      CALL FUNCTION 'HR_TIME_RESULTS_GET'
        EXPORTING
          get_pernr             = w_pernr
          get_pabrj             = it_t549q-pabrj
          get_pabrp             = it_t549q-pabrp
        TABLES
          get_zl                = it_zl
        EXCEPTIONS
          no_period_specified   = 1
          wrong_cluster_version = 2
          no_read_authority     = 3
          cluster_archived      = 4
          technical_error       = 5.
      IF sy-subrc EQ 0.
        WRITE:'successful retrival of time data'.
      ELSE.
        WRITE:'failure in retrival of time data'.
      ENDIF.
      LOOP AT it_zl.
        MOVE it_zl-lgart TO it_zl1-lgart.
        MOVE it_zl-anzhl TO it_zl1-anzhl.
        MOVE it_zl-iftyp TO it_zl1-iftyp.
        WRITE:w_pernr,it_zl1-lgart,it_zl1-anzhl,it_zl1-iftyp.

    You can create an adjustment account under A called A_adj, load data to A, B, and C, then before you consolidate, write a script that goes through and calculates the adjustment (A_adj) by taking the difference between A and B + C. "A_adj" = "A" - ("B"+"C");
    Now to get all this to work dynamically will take some work but using @CHILDREN and @CONCAT functions along with @CURRMBR, should get it done. As for performance, that would remain to be seen.
    Is there any particular reason why your supporting detail doesn't support the totals you are getting? Perhaps you should be going back to the source and getting a better data feed that has all the correct numbers in it. I know you can't always do that, but before engineering a big work around, I would take a pass at the source and see if you can get better data to begin with.

  • How to retrive the deleted data in Z table

    Hi Gyes,
    How to retrive the deleted data in Z table.
    Thanks & Regards,
    Suresh

    Hello Suresh
    If you have not activated the technical setting "Log data changes" in the definition of your z-table (which is unlikely) then there will be no change documents available.
    If you have downloaded your z-table entries sometimes you could use these data for recovery.
    Otherwise your last change is to ask your <b>basis team</b> when the last backup has been made.
    Regards
      Uwe

  • Can BDC Data be corrected of an erroneous transaction (Sesion Method) ?

    Hi,
    I read the below text at
    http://wiki.sdn.sap.com/wiki/display/ABAP/BatchInputFAQ#BatchInputFAQ-WhatistheSimulateBackgroundmode%3F
    There is a built-in error and recovery mechanism in SM35 to view the log of errors and run the erroneous transactions again (note: the BDC data cannot be corrected)
    So,
    1. If BDC Data cant be corrected, why would one run the session again ?
    2. What one achieves by rerunning ?
    If it needs correction of data, then would it require creation of a new session by the program ?
    Regards,
    Chitwanjit

    Hello,
    this may be helpful if the BDC data is ok but the customizing is incorrect.
    E.g. you've built up BDC Data but your functional expert forgot to transport his
    new created Order-Type to production :-(.
    Or if you get 1001 errors because some number range is simply full.
    Regards
    Wolfgang

  • Urgent help !!!!!   BDC date Problem

    hi ,
    I have requ that if no date is mentioned in flat file i need to pass bank value in Tcode .
    But when i uploading the values date field is taken values '0000000' which is saying invaild value.
    I used in bdc_open_group field DATFM = space . still it is not working .
    plz help.
    Thanks,
    sridhar

    You might want to try to write the data to a 10 type c field.  Then use this field in your BDC.
    data: bdcdate(10) type c.
    concatenate '00' '00' '0000' into bdcdate separated by '/'.
    write:/ bdcdate.
    Regards,
    Rich Heilman
    PS.
    Put yourself on the SDN world map (http://sdn.idizaai.be/sdn_world/sdn_world.html) and earn 25 points.
    Spread the wor(l)d!

  • BDC ---Data maintainance at flat file

    Hi All,
    Iam a BI resource learning ABAP.
    I have started learning abap in that currently working with BDC.
    Here iam trying to extract data from flat file(note pad) for practice purpose and extraxting data by session method fore ground process.
    Here in flat file i want to maintain two table of data and want to insert this data in related tables.
    i have created note pad file
    for vendor data and customer data have maintained data horizontally like
    lifnr    name1     land1     kunnr    name1   land1
    1      xx               US      2        yyyy            UK
    Finally the data is geting inserted in the lfa1 and kna1 table are like
    lifnr 1 record s at vendor table and kunnr2 record is at customer table.
    but now i want to maintain data at note pad as in vertical like
    lifnr    name1     land1 (not maintaining these fileds in note pad only values giving in note pad)
    1      xx               US
    kunnr    name1   land1
    2        yyyy            UK
    So is there any way to maintain my data in note pad like this.
    please advice.
    regards
    Saha

    hie
    I hope i understood you well, you want to maintain many records in your flat file you are still able to pick them all.  Please elaborate what you mean by maintaining your records in vertical format???
    Vendor file
    1,200,ABC,02
    2,200,DEF,02
    Customer file
    1,200,QWE,02
    2,200,SDW,02
    The two sets of data seem to be different ie Customer and Vendor thus i think you should maintain the two as separate files and pick both at the same time.
    regards
    Isaac Prince

  • Bdc data upload

    I am trying to do bdc for ac02, using session method, data is updating in bdcdata table,
    its not getting into the database,
    PERFORM :
      fill_bdc_data USING 'SAPLBAS0' '0300' 'X'  ' '  ' ',
      fill_bdc_data USING  ''  ''  ''   'BDC_OKCODE' '=NEW',
      fill_bdc_data USING  ''  ''  ''   'ASMDT-ASKTX' fs_field-ASKTX,   "SERVICE TEXT.
      fill_bdc_data USING  ''  ''  ''   'BDC_OKCODE' '/00',             " Enter.
    *ERROR
    fill_bdc_data using  ''  ''  '' '0300',                "'SAPLBAS0' '0300',
    fill_bdc_data using  ''  ''  '' 'BDC_CURSOR',    "'ASMD-ASNUM',      "fs_field-asnum,
    fill_bdc_data using  ''  ''  '' 'BDC_OKCODE' '=NEW' ,
    ERROR
      fill_bdc_data USING 'SAPLBAS0'  '0300' 'X' ' ' ' ',
      fill_bdc_data USING  '' '' ''  'ASMD-ASTYP(01)' fs_field-ASTYP,   " SERVICE CATERGORY.
      fill_bdc_data USING  ''  ''  ''   'BDC_OKCODE' '/00',             " Enter.
      fill_bdc_data USING  '' '' ''  'ASMD-MEINS(01)' fs_field-MEINS,   " BASE UNIT.
      fill_bdc_data USING  ''  ''  ''   'BDC_OKCODE' '/00',             " Enter.
      fill_bdc_data USING  '' '' ''  'ASMD-MATKL(01)' fs_field-MATKL,   " SERVICE GROUP.
      fill_bdc_data USING  ''  ''  ''   'BDC_OKCODE' '/00',             " Enter.
      fill_bdc_data USING  '' '' ''  'ASMD-SPART(01)' fs_field-SPART,   " DIVISION.
      fill_bdc_data USING  '' '' ''  'BDC_OKCODE'   '/00',               " Enter.
      fill_bdc_data USING 'SAPLBAS0' '0300' 'X' ''  '' ,
      fill_bdc_data USING  '' '' ''  'BDC_OKCODE' ' /12'.                  " Save.
    ENDFORM.                               " POPULATE_BDCDATA

    hi ,
    fill_bdc_data USING '' '' '' 'BDC_OKCODE' ' /12'. " Save.
    it should be
    fill_bdc_data USING '' '' '' 'BDC_OKCODE' ' /11'. " Save.
    regards
    Deepak.

  • BDC Data transfer - Session method...?

    Dear All,
    How to Transfer data using BDC Session method? - Step-by-step Process.
    Regards,
    Dharmesh

    hi,
    this will be usefull to u
    2.1.     Steps for submitting data for Batch Processing
    1.     Analyze the transactions for which a BDC program.
    The user has to determine the sequence of screens in the transactions and the information   about all the fields in every screen. To do this the user must run the transaction .
    Then select System &#61664; Status. This will give the screen number and the module pool associated with this screen of the transaction. These two are the most important fields that     the user would need in order to write the BDC program.
    2.     Use transaction SE38 to write the BDC program. This ABAP/4 program should reads the  external data that is to be entered in the SAP System and stores the data in a "batch-input session." A session stores the actions that are required to enter data using normal SAP transactions.  This is done by basically using three functions:
       BDC_OPEN_GROUP
       BDC_INSERT
       BDC_CLOSE_GROUP.
    3.     To create a batch input session, use the function BDC_OPEN_GROUP. This function has the following 5 parameters :
    a.     CLIENT which is by default set to SY_MANDT. It is the client in which the session is to be processed.
    b.     GROUP which is the name of the BDC session. This parameter is important because it is with this name that the user will recognize the BDC session in the batch input queue. Using this name process the BDC session.
    c.     USER which is usually set to SY-UNAME. It is the user name for starting the session in background.
    d.     KEEP indicates whether the session should be kept or deleted after processing. If ‘ ‘ then the session is deleted. If ‘X’ then the session is retained even after it is successfully processed without any errors.          
    e.     HOLDDATE Lock date.  The session is locked and may not be processed until after the date that is specified. Default:  No lock date, session can be processed immediately.  A lock date is optional.
    4.     Populate the bdcdata table .
          The user may define the table as  follows:
          DATA: BEGIN OF BDCDATA OCCURS 0.
                      INCLUDE STRUCTURE BDCDATA.
          DATA: END OF BDCDATA.
          This bdcdata structure has the following fields:
    •      PROGRAM
    Name of the program.
    •      DYNPRO
    Number of the screen.  Set this field only in the first record for the screen.
    •      DYNBEGIN
    Indicates the first record for the screen.  Set this field to X only in the first record for the screen. (Reset to ' ' (blank) for all other records.)
    •      FNAM
    Name of a field in the screen.  The FNAM field is not case-sensitive.
    •      FVAL
    Value for the field named in FNAM. 
    5.     The next step is to submit the BDC session. Use the BDC_INSERT function module to add a transaction to a batch input session.  Specify the transaction that is to be started in the call to BDC_INSERT.
          BDC_INSERT takes the following parameters:
    •      TCODE
    The code of the transaction that is to be run. TCODE is an EXPORTING parameter in the function module.
    •      DYNPROTAB
    The BDCDATA structure that contains the data that is to be processed       by the transaction. DYNPROTAB is a tables parameter in the function       module.
    6.     The final step is to close the BDC session. Use the BDC_CLOSE_GROUP function module to close a session. Once a session is closed, it can be processed.
    7.     Running this program will create a batch input session by the name that is specified in the GROUP parameter in the BDC_CREATE_GROUP function call.
    8.     Transaction SM35 can be used to process the submitted session. This transaction can be used to check the status of all BDC sessions.
    2.2.     Summary: Creating Batch Input Session:
    •     Open Batch Input group
        CALL FUNCTION 'BDC_OPEN_GROUP'   
        EXPORTING
              CLIENT = SY-MANDT
              GROUP  = GROUP
              USER   = USER
              KEEP   = KEEP.
    •     Fill in the Data for Transaction in an internal table 'BDCDATA'
            FORM INSERT_SCREEN USING PROGRAM DYNPRO.
               CLEAR BDCDATA.
               BDCDATA-PROGRAM = PROGRAM.
               BDCDATA-DYNPRO  = DYNPRO.
               BDCDATA-DYNBEGIN = 'X'.
               APPEND BDCDATA.
            ENDFORM.
            FORM INSERT_FIELD USING FNAM FVAL.
               CLEAR BDCDATA.
               BDCDATA-FNAM = FNAM.
               BDCDATA-FVAL = FVAL.
               APPEND BDCDATA.
            ENDFORM.
    •     Insert Transacton
            CALL FUNCTION 'BDC_INSERT'   
            EXPORTING
                TCODE     = 'ME21'
            TABLES
              DYNPROTAB = BDCDATA.
    •     Close Batch Input group
            CALL FUNCTION 'BDC_CLOSE_GROUP'.
    Finally to process Batch Input Session, first execute the BDC ABAP. This will create
    a BDC session. Run transaction 'SM35' & processes the BDC session.
    regards,
    padma.

  • BDC date field should be blank

    I am creating a bdc - the date field should be blank.
    My logic is if input-field ne '0'.
      if w_ausbs ne '00000000'.
          PERFORM bdc_field    USING 'VIQMEL-AUSBS'  w_ausbs.
       else.
          PERFORM bdc_field    USING 'VIQMEL-AUSBS'  ' '.
       endif.
    Initially i just tried
      if w_ausbs ne '00000000'.
          PERFORM bdc_field    USING 'VIQMEL-AUSBS'  w_ausbs.
      endif.
    However, the field still gets populated with '00000000' which casues an error since it should be blank.  Able to create manually without entering a value in this field so it is not mandatory.
    Any ideas on how to get this field to be left blank.
    Thanks,
    Jill

    Hi Jill,
    1. U want the date field to be  blank.
    a) make sure it is not compulsory
    b) secondly, make sure, default value
       does not come up when entering
       data in the tcode
    2. If this is so , then
       how is ur w_ausbs defined ?
       a) it should be c(8)
    (so that 0000000 does not come,
      spaces come !)
      and specificlally passit
      using
    PERFORM bdc_field USING 'VIQMEL-AUSBS' w_ausbs. <---
    regards,
    amit m.

  • How to retrive images from data base

    I am facing problem to retriving image data from
    DATABASE
    and how can i so that retrived image into web page
    plz help me

    Look at the URL below:
    How to store/retrieve image to/from SQLServer
    http://www.java-tips.org/content/view/203/29/
    Example below fetch pdf doc from database and show in browser, in order to show image the only difference would be setting the content type to
    response.setContentType("image/jpeg");
    How to view XLS documents loaded from database in the web browser
    http://www.java-tips.org/content/view/844/29/

  • Way to verify BDC data before input ??

    Hi,
    I have the following requirement. I have a set of 1000 records as input to my program. This dataset is parsed and fed as input to my transaction using PERFORM bdc_field  statement. For each record, I call the PERFORM bdc_transaction statement.
    It so happens that few records fail to pass through the transaction.
    I want first my program to run a kind of sample run with the input data and see if all records can get through the transaction. If not then I want to report those records as erroneous ones and expect the user to correct the data error in the file or in the system and then rerun the program. Note during test run, none of the data from the input file should be loaded in to the transaction !! It should just a kind of test..
    Hope I am clear.
    Please let me know how to achieve this ?
    thanks

    It depends on the transaction you are executing. Some have a check or validate feature that allows the user to make sure everything is OK before trying to save. But most don't.
    What I've done is, if the 'TEST' checkbox is ticked in the BDC program, create a batch input session without pressing the save button. If you press the back button instead, you'll get an error saying that 'Leave to Transaction is not allowed in Batch input' or something like that, but you'll know that the record passed most of the validations (except for the ones that only happen when the data is saved).
    Messy, but it serves the purpose.
    Rob

  • How to retrive the blob data from a table using sql query

    Hi gurus,
    I have a table which has " BLOB "content in a column .I want to view the data From BLOB column using sql query .It would be helpfull If some one share their idea.
    Regards,
    vardhani.

    You can use data templates.
    See this: http://blogs.oracle.com/xmlpublisher/entry/blob_clob_raw_and_looooong
    http://blogs.oracle.com/xmlpublisher/entry/inserting_blobs_into_your_repo
    Thanks,
    Bipuser

  • How to use sql:query/ tag to retrive the system date?

    hi all,
    i want to know if i can use the <sql:query/> tag in jstl to get the database server time. please send me a code snippet to retrive n display the result. i'm new to jstl tags. please help.
    thank you,
    AM

    Check out the first hits: http://www.google.com/search?q=jstl+sql+tutorial+site:sun.com

  • BDC date recording

    Hi,
      i am getting the date from input file in YYYYMMDD format. But i have to map the date into vk11 Tcode as MM/DD/YYYY. If i am assigning it directly it is taking the YYYYMMDD format and it is telling invalid date. So, how can i convert it and how can i map it in MM/DD/YYYY format. Can anybody tell me. If any body having code can send it to me.  Very Urgent......
    Thanks.........

    REPORT zforum12 message-id vij.
    Check the code
    data : date like sy-datum.
    data : odate(10) type c.
    date = sy-datum.        " in format YYYYMMDD
    CALL FUNCTION 'CONVERSION_EXIT_PDATE_OUTPUT'
      EXPORTING
       input         = date
    IMPORTING
       OUTPUT        = odate         .
    write:/ odate.
      "in ur format 'MM/DD/YYYY
    1.
    In ur itab make a field for date as 10 characters and use this Fm to store the date .
    2. Pass the date as the charcter field to the screen and now check .
    This will do .
    vijay

  • Bdc data  reg..

    Dear gurus,
    I want run a bdc for transaction mm02.
    i want to update 20 record  from the xl file.
    If 10th record getting problem, what will happen if i use session method ?
    what will happen if i use call transanction method?
    how to find the error in the both methods?
    kindly let me know.
    thanks in advance
    R.Rajendran

    Only the 10th record gets failed in both session and call transaction method.
    The rest gets updated just fine.
    In BDC Session methiod, you can get the error log in the SM35 transaction.
    IN case of call transaction, you have to handle the errors yourself like this
    call transaction '<TCODE>' using it_bdcdata messages into it_bdcmsgcoll options from x_CTUPARAMS.
    if sy-subrc <> 0.
    loop at it_bdcmsgcoll.
    call function 'FORMAT_MESSAGE'
    exporting
    message = v_message.
    write:/ v_message.
    endloop.
    endif.

Maybe you are looking for

  • How to convert a new Apple ID into a iCloud email alias?

    Howdy, Just a few weeks ago, I created a second MobleMe accout for my daugher via my MobleMe family plan. The reason was that her orignal MobleMe email ([email protected]) address seemed a bit childish to her and she wanted a new "more professional" sound

  • How can I stop Photoshop CS5.5 taking control of html and pdf files without the user's consent?

    Our client uses CS 5.5, and Photoshop will continuously take control of pdf and html files. This is without any interraction from the user, and after setting it back to the desired settings (pdf - Reader, html - Chrome), after some time (and doesn't

  • Copy paste a front panel object to the very same xy location

    Hello, Just a practical question, but I would need this kind of feature very often: How can I copy-paste a front panel object to the very same location? Lets consider I have a TAB container, and on the first page, I have a Graph. I would like to make

  • Java WS Client for Outbound interface

    Need to create java web service client for an Outbound Interface in PI.  This client will be used in an EJB developed for an inbound interface.  Created Web Service client based on WSDL in the same EJB. However, do not know how to configure logical p

  • Possible to burn book pages to disk?

    I am about half way through a book but need the person for whom it is being done to look at it before I continue. Is there a way to burn it to disk so I can mail it to her? She's PC, not Mac, and I think a disk would work best. Thanks to anyone who c