How to send an updated list using batch job

Hi All,
  The program displays data on the screen, if the data looks ok, then there is an option to update.
When I run update, the program submits a batch job and the basic list gets updated, but my batch job is still sending the data on the screen. how can i send the updated list using batch job.
  Ex: output of the program
                1         2
       there is an update button on the screen, when i press update button, my program submits in batch job, the above list becomes
                1        2
                3        4
but when i check the spool, it shows the o/p as         1           2 ..it is not sending the updated list.
Please suggest me how to send the updated data
Thanks,
Kumar

Hi Krishna,
  I have added a button on the alv list. when i press update button, my program updates the list, then submits the batch job. I am attaching the sample test program i am trying with, please suggest me how can i get the updated list.
*& Report  ZTESTSSSSS
REPORT  ZTESTSSSSS.
DATA: gt_fieldcat TYPE slis_fieldcat_alv,
      lt_fieldcat type slis_t_fieldcat_alv,
      gt_sort     TYPE slis_t_sortinfo_alv,
      g_repid     LIKE sy-repid,
      gt_layout   TYPE slis_layout_alv.
start-of-selection.
  lt_return-type = 'S'.
  lt_return-message = 'test message'.
  append lt_return.
  CLEAR gt_fieldcat.
  gt_fieldcat-fieldname = 'TYPE'.
  gt_fieldcat-outputlen = '3'.
  gt_fieldcat-tabname   = 'LT_RETURN'.
  gt_fieldcat-seltext_l  =  'Type'.
  gt_fieldcat-seltext_m  =  'Type'.
  gt_fieldcat-seltext_s  =  'Type'.
  APPEND gt_fieldcat TO lt_fieldcat.
  CLEAR gt_fieldcat.
  gt_fieldcat-fieldname = 'MESSAGE'.
  gt_fieldcat-outputlen = '15'.
  gt_fieldcat-tabname   = 'LT_RETURN'.
  gt_fieldcat-seltext_l  =  'Message'.
  gt_fieldcat-seltext_m  =  'Message'.
  gt_fieldcat-seltext_s  =  'Message'.
  APPEND gt_fieldcat TO lt_fieldcat.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_CALLBACK_PROGRAM       = sy-repid
      I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
      I_CALLBACK_USER_COMMAND  = 'USER_COMMAND'
      IT_FIELDCAT              = lt_fieldcat
    TABLES
      T_OUTTAB                 = lt_return
    EXCEPTIONS
      PROGRAM_ERROR            = 1
      OTHERS                   = 2.
*&      Form  set_pf_status
      text
     -->RT_EXTAB   text
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
  SET PF-STATUS 'STANDARD'.
ENDFORM. "Set_pf_status
*&      Form  user_command
      text
     -->R_UCOMM      text
     -->RS_SELFIELD  text
FORM user_command USING r_ucomm     LIKE sy-ucomm
                        rs_selfield TYPE slis_selfield.
  DATA: li_count TYPE I.
  IF r_ucomm EQ 'UPD'.
Adding another message
    lt_return-type = 'S'.
    lt_return-message = 'Another test message'.
    APPEND lt_return.
    rs_selfield-refresh = 'X'.
    rs_selfield-col_stable = 'X'.
    rs_selfield-row_stable = 'X'.
    l_upd = 'X'.
   LOOP AT lt_return.
     WRITE: / lt_return-type, lt_return-message.
   ENDLOOP.
    IF sy-batch IS INITIAL.
      l_upd = 'X'.
Open the Job
      CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          jobname          = w_name
        IMPORTING
          jobcount         = w_number
        EXCEPTIONS
          cant_create_job  = 1
          invalid_job_data = 2
          jobname_missing  = 3
          OTHERS           = 4.
      IF sy-subrc = 0.
        SUBMIT ('ZTESTSSSSS') VIA JOB w_name NUMBER w_number
                AND RETURN
                WITH p_recnnr = p_recnnr.
        CALL FUNCTION 'JOB_CLOSE'
          EXPORTING
            jobcount             = w_number
            jobname              = w_name
            strtimmed            = 'X'
          EXCEPTIONS
            cant_start_immediate = 1
            invalid_startdate    = 2
            jobname_missing      = 3
            job_close_failed     = 4
            job_nosteps          = 5
            job_notex            = 6
            lock_failed          = 7
            OTHERS               = 8.
      ENDIF.
    ENDIF.
  ENDIF.
ENDFORM.  "User_command
Thanks,
Kumar

Similar Messages

  • How to upload data into CRM using batch job

    Hello,
    I got some problem and need some hints.
    I am uploading data from a flat text file (product data) into CRM using thefunction module GUI_UPLOAD. My program starts with a selection screen whereI enter the path and the filename of the program, then I click start, and
    the data is transferred in CRM. This works perfect, and I can automaticallycreate service products in CRM.
    Here comes the PROB:
    But now I want to automize this procedure using a batch job that automatically picks up the file from the server and processes it automatically without any user interaction. BUT I always get an error saying that my function module GUI_UPLOAD can't run in batch mode. So
    anyone has an idea how to do this? Any other function modules that can run in batch mode? Any other ideas?
    Thx very much for ur help on this.

    Hi Bill,
    GUI_UPLOAD, like the name says, uses the SAPGUI to upload the data to theserver.. and in a batch job, you don't have the connection to a SAPGUI.
    So you should use following kind of coding:
    DATA MSG(100).
    OPEN DATASET "FILENAM" FOR INPUT IN TEXT MODE ENCODING DEFAULT MESSAGE
    MSG.
    IF sy-subrc = 0.
    DO.
    READ DATASET "FILENAM" INTO [Your internal table].
    IF sy-subrc <> 0.
    EXIT.
    ENDIF.
    APPEND [Your internal table]P_DATA.
    ENDDO.
    ENDIF.
    The file should then be available on the server.
    Regards

  • How to get the list of batch jobs running in a specific application server

    Hi Team,
    I am trying to check in SM37 if there is any specific condition to get the list of batch jobs assigned to a specific target server but cant find any.
    Is there is way to find the list of batch jobs assigned to run in one specific application server.( Target server specified in SM36 while job creation)

    Hello,
    This is what you can do in SM37.
    Execute the list of batch jobs, when the result appears on the screen edit the ALV grid via CTRL+F7.
    Now add the following columns "TargetServ" and "Executing server".
    You will now have two extra columns in your result list.
    TargetServr contains the value of the application server where the job should run when you have explicitely filled it in.
    Often this is empty, this means that at runtime SAP will determine itself on which application server the job will run (depending of course where the BGD processes are defined).
    Executing server is filled in always for all executed jobs, this is the actual application server where the job has run.
    You can also add these two fields in your initial selection screen of SM37 by using the "Extended job selection" button.
    I hope this isusefull.
    Wim

  • How to send images through PI using SOAP adapter

    hi,
    Can anybody tell me how to send images through PI using SOAP adapter.
    Regards ,
    Loveena

    Hi Loveena,
    only as attachments of a SOAP message.
    Regards,
    Udo

  • How to send a https request using jsf

    hi
    Can anybody tell a sample how to send a https request using JSF ...
    thanks

    Prefix the request URI with the https protocol.
    The answer is too easy and straightforward that I guess that you mean something else. If you just want to know how to configure an SSL environment for your own webapplication, refer to the Java EE tutorial chapter 28: http://java.sun.com/javaee/5/docs/tutorial/doc/

  • How to send HTML Format Mail using Java Mail in oracle 9i Forms

    Dear All
    could you please tell me how to send HTML Format Mail using Java Mail in oracle 9i Forms and how to implement the java mail ?
    if it is possible, could you please send me the sample code? please very urgent
    Thanks
    P.Sivaraman

    Hello,
    <p>Here is a Form sample.</p>
    Francois

  • How to run a ABAP Program in Batch JOB

    How to run a ABAP Program in Batch JOB ?

    Hello Manish,
    Using transaction SM36 you can define the batch job along with the start conditions for that job.
    1. Transaction SM36.
    2. Give the Z name of the job in the 'Job Name' input field.
    3. Click on 'Steps' button from the application toolbar.
    4. On the 'Create Step 1' dialog box, give the name of the ABAP program in the 'ABAP Program' section' along with the variant.
    5. Click on 'Check Input' button from the dialog box.
    6. Click on 'Save' button from the dialog box once the check is successful.
    7. One list will be shown. Click on Back button from the standard toolbar.
    8. Click on 'Start Conditions' button from the application toolbar. Specify the start condition e.g. immediate. Click on save.
    9. The job staus is now scheduled.
    10.Click on Save button from the standard toolbar of SM36. The job status will be released.
    Using SM37 you can monitor the status of the job.
    This will sort out your problem.
    PS If the answer solves your query, plz reward points.
    Regards

  • Mail-how to send to a list without entering ea as individual contact?

    I sent email reminders monthly to a group of about 20 email addresses. I don't even know most of the people & there are changes each month with additions & deletions. In Eudora on my old Dell I just had a contact with the whole list in it. Then when i got the MacBookPro I was syncing to a windows mobile phone for biz so I synced to Outlook. Outlook woudln't let me have a group contact but I finally figured i could but the list in the bcc field. Then each month I just opened the previous month's email & said to send again & edited it.
    I finally got my emails imported from both Eudora & Outlook to mail. But I find that I can't even see the contents of the bcc field from the mo before--its blank.
    OK, I thought I could copy the list & then paste it in each time. I have the list with the name of the person followed by their email address. I had originally entered it by putting brackets around the email addresses. But in the list the email addresses are showing as a link. OK. But I tried copying it into both Note & also tried Pages & then tried copying from there into Mail.
    In both Note & Pages the email addresses show as a link, but when I paste the list into the bcc field of a Mail email it just shows them with a space between the name & the email address with the email address not being set apart.
    This is getting more & more complicated--what was easy in the Free Sponsored Eudora, & not too bad in Outlook. But right now after trying what worked before, it doesn't look like any of the solutions are going to work.
    If I could copy them in from a list & paste them in, I could live with that, but it doesn't look like that is going to work at all since in the other programs they are links which seem to be lost when pasted into Mail.
    I also tried pasting the list into the body of an email & from there to the bcc field but again, it seemed lose its formatting so that it recognized the email addresses.
    Any suggestions on how to have a group list that I can send without them all displaying to everyone & use mo after mo?
    OK, I just tried retyping a couple of the names with brackets around the email address in Pages & copying it into the bcc field & it looked like it worked. I guess that might work.  But is there are way to convert the links in pages to I guess it would be html with the brackets around?
    Or any other suggestions?
    Mail 4,5

    The issue is that, as I said in my original post, I'm trying to figure out how to do it without setting up each of the people in addressbook. A couple of them I know & they are in Addressbook. Most of them I don't know & don't really want to have to set each 1 up individually. I read something about that I could enter all the contacts in a field & the little blue bubble around the contact nickname would appear, but so far it isn't working with pasting the list in.  For practically all of the contacts, I have the name then the email address for example: John Smith [email protected] On the list, the emails show as links in Pages or in Note, but when I paste them into the to or bcc field, the link appears to disappear.
    So I need some way to set up a group of email addresses as a contact without setting them up individually in Addressbook.
    I'm frustrated since this was so simple to do in Eudora (which I don't have on my Mac--was using it in Windows before coming back to mac.)  Again, I don't want to set them all up as individual contacts to clutter up my addressbook since I don't even know many of them.
    btw, tried to respond sooner but in the middle of it they were updating this part of the site so I couldn't. Then had the S California power failure here yesterday so not internet.

  • How To Send Multiple Spool Lists  from a Single Step in SM37

    We have converted all of our output reports to ALV and now instead of one big spool that contains all the reports generated in a single step we now have multiple spools.  We run the program as a Batch Job in SM37 and have created an entry in the SPOOL LIST RECIPIENT for the job.  The problem is that it only sends one of our lists.  Is there a way to make it send all of the ists?

    You need to write areport program with fm 'RSPO_RETURN_ABAP_SPOOLJOB'  and collect all spools and send it and make this as precedent job after your ALV spool jobs

  • How to get registry key lastwritetime using batch/powershell

    Hello,
    I want to get a registry key's LastWriteTime using batch/powershell.  These are what i have tried..
    1. Launch regedit and manually export the key using the UI, this gives me the lastwritetime, but I need a commandline version of this.  regedit /e only exports the key and value data.
    2. dir HKLM:\software\mykey
    nothing returned
    3. Get-ChildItem HKLM:\software\mykey |  Select-Object *
    nothing returned
    4. Get-ItemProperty HKLM:\software\mykey | Select-Object *
    LastWriteTime not returned; other values are returned
    5. (Get-Item HKLM:\software\mykey).LastWriteTime
    Nothing is returned
    Is the only way to do this by using pinvoke with RegQueryInfoKey? 
    Thanks in advance
    ss883r

    The
    .zip on the repository will still work for version 2. Basically, you'll get a definition for a function called 'Add-RegKeyMember'. You can dot source the provided script, or you can copy the function definition into your own script. You would use it like
    this:
    # Using Get-Item:
    PS> Get-Item HKLM:\SOFTWARE | Add-RegKeyMember | select Name, LastWriteTime, ClassName  
    # Using Get-ChildItem:
    PS> Get-ChildItem HKLM:\SOFTWARE | Add-RegKeyMember | select Name, LastWriteTime, ClassName  
    # Passing a path:
    PS> Add-RegKeyMember HKLM:\SOFTWARE | select Name, LastWriteTime, ClassName
    There's also a proxy function for Get-ChildItem that will automatically add the property anytime you use Get-ChildItem (dir, ls, gci) on a registry path. The PSv3 only method I was talking about simply updates the type data to automatically call the function
    on any RegistryKey object. You can actually set version 2 up to do that, but it requires an XML file.

  • Import group members those are inactive more than 30 days to a csv file and then send the updated list by email

    Hello,
    I am very new to powershell and I have been looking for a solution where I can list all the inactive members more than 30 days from  particular groups in AD, export the updated list to a csv file and send the file by email . . Can someone help me on
    this?
    thanks

    Hi,
    Take a look at Get-ADGroupMember, Get-ADUser, Export-Csv, and Send-MailMessage:
    http://ss64.com/ps/get-adgroupmember.html
    http://ss64.com/ps/get-aduser.html
    http://ss64.com/ps/export-csv.html
    http://ss64.com/ps/send-mailmessage.html
    Let us know if you have any specific questions.
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • How to send the email without using server side (Php, java)

    How to send the (Run time image or file) Email & Attachment in Flex web application. without using php, java.

    Well, at some point your email needs to be handed over to an SMTP server. It's a fair amount of work, but if you want to just send an email you could open a socket to a mail server's SMTP port and follow the SMTP protocols to send your email.
    ActionScript sockets: http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9 b90204-7cf7.html
    SMTP protocol: http://tools.ietf.org/html/rfc821
    -- Tom

  • How to create an update listener using event notification in MDM Java2 API.

    Hi folks,
    I need some help on how to create an update listener for Customer updates in MDM using notification API. Could some one point me to where I should start. We are still using SP5.
    Thanks
    -Sai

    Hi All,
    I need to create update listener with notifications and it is giving this error.
    Nov 14, 2008 12:26:21 PM com.sap.mdm.internal.net.ConnectionImpl finalize
    INFO: Disconnect was not called. Cleaning up connection in finalize.
    Nov 14, 2008 12:26:21 PM com.sap.mdm.internal.net.ConnectionImpl finalize
    INFO: Disconnect was not called. Cleaning up connection in finalize.
    Nov 14, 2008 12:26:21 PM com.sap.mdm.internal.net.ConnectionImpl finalize
    INFO: Disconnect was not called. Cleaning up connection in finalize.
    I am still using SP05 and noticed that some mentioned that MDM4J.jar has to be used. Can someone throw some pointers how to do this with MDM4J.jar. Can I  include MDM4J.jar in the same project along with mdm-admin.jar, mdm-core.jar, mdm-common.jar, mdm-protocol.jar or I shoudl have only MDM4j.jar to create this listener. Any help is appreciated.
    Thanks
    -sai

  • How to send photos from PSE9 using my Gmail account

    Can I send photos from PE9 using my gmail account?  If so how?
    Message title was edited by: Brett N

      Yes you can if you replace your email client with Adobe Email Service
    Open the Organizer and Click Edit à Preferences à Sharing
    Under Email settings click the dropdown menu and choose Adobe Email Service
    Then enter your name and gmail address.
    Obtain the verification code from adobe and paste it into the dialog to confirm.
     

  • Creating Physical Inventory Documents using batch job in WM

    We use transaction LX26 to create the physical inventory documents for the storage bins and the materials therein. and the new PI dates are proposed based on the cycle count indicators configured.
    We want to automate the creation of physical inventory documents using a batch job. How can we achieve this?
    I understand that the program RM07ICN1 generates PI documents only when materials are managed at IM levels and this does not work for WM. Is there any other standard program which can be set up in batch to create the PI documents for the materials at WM level? If there is something then please let me know details....
    Thanks,

    I entered following details,
    WH no.
    Storage Type
    Inventory in Period (One year date range)
    Inventory Count date (Today's date)
    The output in spool shows me the following,
    No of Records Passed ;Quant Information; InventoryProposal; Later / block; Bin Information; Empty bins; Inventory active
    The list of storage bin, material, description & inventory date is also displayed.
    Description has Scheudled and Overdue and the inventory date is some dates in next months.
    It doesnt show anywhere that inventory document is generated.Please note that I had not selected the Activate Inventory List check box because I just want the system to auto create the inventory documents based on the logic of cycle count indicators.

Maybe you are looking for

  • Planning file entry question MD21

    I understand that if i change a material mrp views or planning related master data then automatically i see netch indicator will be set in MD21. in what cases does i see indicator set for reset proposals and bom explosion? in other words if i want to

  • Which service packs are the eqivalent as the Windows 7 version for W2003?

    Thank you for your response to "Crystal Reports XI Release 2 .Net 2005 Server Compatability": Crystal Reports XI Release 2 .Net 2005 Server Compatability I did try the Service Pack update for Windows 7 and it worked and resolved the error -- Thank yo

  • Launching Word with exec

    I'm trying to open a file in Microsoft Word and I use: Process m = Runtime.getRuntime().exec("winword.exe \"" + location + "README.doc\""); which reports an exception. Then I try: Process m = Runtime.getRuntime().exec("cmd.exe /c winword.exe \"" + lo

  • Third Party Orders

    Hi All when creating third party sales order for a make to order scenario my inventory account is getting hit and is throwing an error - therefore, i need to be able to do a statistical goods receipt on this scenario I have mapped all accts in OBYC a

  • Removing Items From Array Collection

    Hi. I have an array collection which is made up of items defined in class PlayListEntry. I want to remove all the items that have the value of property select set to false. This is what i have come up with, it works fine, but only removes half the it