Attaching Notes using GOS in background mode.

Hi,
I have a requirement where i have to attach notes to transaction WTYAUT through a abap program in background mode. Is there any FM/CLASS to do this?

check these weblogs.
/people/rammanohar.tiwari/blog/2005/10/10/generic-object-services-gos--in-background - part I
/people/rammanohar.tiwari/blog/2006/03/25/generic-object-services-gos--in-background--part-ii - part II
Regards
Raja

Similar Messages

  • Attaching URL using GOS with 2 key fields

    I found a program to attach URL using GOS. I tried the program using his sample Business object (BUS2012) and supplied a valid PO and the program works.
    When I use the program using business object BUS1505 (Real Estate Contract) and put a valid contract number, the program didn't attached the URL. When I check the business object, I found out that the key fields are 2, Company Code and Contract Number. With this, how can attach it to the program.
    Please help me on this. Thanks in advance.
    Report  Z_RMTIWARI_ATTACH_DOC_TO_BO
    Written By : Ram Manohar Tiwari
    Function   : We need to maintain links between Business Object and
                 the attachment.Attachment document is basiclally a
                 business object of type 'MESSAGE'.In order to maintain
                 links, first the attachment will be crated as Business
                 Object of type 'MESSAGE' using Message.Create method.
                 Need to check if we can also use FM
                 'SO_DOC_INSERT_WITH_ORIG_API1' or SO_OBJECT_INSERT rather
                 than using Message.Create method.
    REPORT  Z_RMTIWARI_ATTACH_DOC_TO_BO             .
    Include for BO macros
      INCLUDE : <cntn01>.
    Load class.
      CLASS CL_BINARY_RELATION definition load.
      CLASS CL_OBL_OBJECT      definition load.
    PARAMETERS:
    Object_a
       P_BOTYPE LIKE obl_s_pbor-typeid DEFAULT 'BUS1505', " e.g. 'BUS2012'
       P_BO_ID  LIKE OBL_S_PBOR-INSTID DEFAULT '0000010000273',    " Key e.g. PO No.
    Object_b
       P_DOCTY  LIKE obl_s_pbor-typeid DEFAULT 'MESSAGE' NO-DISPLAY,
       P_MSGTYP LIKE SOFM-DOCTP        DEFAULT 'URL'     NO-DISPLAY,
    Relationship
       P_RELTYP  LIKE mdoblrel-reltype DEFAULT 'URL'.
      types: BEGIN OF TY_MESSAGE_KEY,
              FOLTP   TYPE SO_FOL_TP,
              FOLYR   TYPE SO_FOL_YR,
              FOLNO   TYPE SO_FOL_NO,
              DOCTP   TYPE SO_DOC_TP,
              DOCYR   TYPE SO_DOC_YR,
              DOCNO   TYPE SO_DOC_NO,
              FORTP   TYPE SO_FOR_TP,
              FORYR   TYPE SO_FOR_YR,
              FORNO   TYPE SO_FOR_NO,
             END OF TY_MESSAGE_KEY.
      DATA : LV_MESSAGE_KEY type TY_MESSAGE_KEY.
      DATA : LO_MESSAGE type SWC_OBJECT.
      DATA : LT_DOC_CONTENT type standard table of SOLI-LINE with header
    line.
    First derive the Attachment's ( MESSAGE )document type.
      P_DOCTY = 'MESSAGE'.
      CASE P_RELTYP.
      In case of URls
        WHEN 'URL'.
           P_MSGTYP = 'URL'.
      In case of Notes / Private Notes
        WHEN 'NOTE' OR 'PNOT'.
           P_MSGTYP = 'RAW'.
        WHEN 'ATTA'.
           P_MSGTYP = 'EXT'.
      Not implemented as yet...exit
         EXIT.
        WHEN OTHERS.
       ....exit
         EXIT.
        ENDCASE.
    Create an initial instance of BO 'MESSAGE' - to call the
    instance-independent method 'Create'.
      swc_create_object LO_MESSAGE 'MESSAGE' LV_MESSAGE_KEY.
    define container to pass the parameter values to the method call
    in next step.
      swc_container LT_MESSAGE_CONTAINER.
    Populate container with parameters for method
      swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTTITLE' 'Title'.
      swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTLANGU' 'E'.
      swc_set_element LT_MESSAGE_CONTAINER 'NO_DIALOG'     'X'.
      swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTNAME' P_DOCTY.
      swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTTYPE'   P_MSGTYP.
    'DocumentContent' is a multi-line element ( itab ).
    In case of URLs..it should be concatenated with &KEY& in the begining.
      CASE P_MSGTYP.
        WHEN 'URL'.
          LT_DOC_CONTENT = '&KEY&http://intranet.corpoff' .
          append LT_DOC_CONTENT.
    In case of Notes or Private Notes, get the data from files on appl
    server or from wherever(? - remember background).
         WHEN 'RAW'.
           LT_DOC_CONTENT = 'Hi How r u?' .
           append LT_DOC_CONTENT.
    In case of File attachments
         WHEN 'EXT'.
          Upload the file contents using open dataset in lt_doc_content .
          Some conversion ( Compress ) might be required.
          Not sure at this point
      ENDCASE.
      swc_set_element LT_MESSAGE_CONTAINER 'DocumentContent' LT_DOC_CONTENT.
      swc_call_method LO_MESSAGE 'CREATE' LT_MESSAGE_CONTAINER.
    Refresh to get the reference of create 'MESSAGE' object for attachment
      swc_refresh_object LO_MESSAGE.
    Get Key of new object
      swc_get_object_key LO_MESSAGE LV_MESSAGE_KEY.
    Now we have attachment as a business object instance. We can now
    attach it to our main business object instance.
    Create main BO object_a
      data: LO_IS_OBJECT_A type SIBFLPORB.
      LO_IS_OBJECT_A-INSTID = P_BO_ID.
      LO_IS_OBJECT_A-TYPEID = P_BOTYPE.
      LO_IS_OBJECT_A-CATID  = 'BO'.
    Create attachment BO object_b
      data: LO_IS_OBJECT_B type SIBFLPORB.
      LO_IS_OBJECT_B-INSTID = LV_MESSAGE_KEY.
      LO_IS_OBJECT_B-TYPEID = P_DOCTY.
      LO_IS_OBJECT_B-CATID  = 'BO'.
    *TRY.
    CALL METHOD CL_BINARY_RELATION=>CREATE_LINK
      EXPORTING
        IS_OBJECT_A            = LO_IS_OBJECT_A
       IP_LOGSYS_A            =
        IS_OBJECT_B            = LO_IS_OBJECT_B
       IP_LOGSYS_B            =
        IP_RELTYPE             = P_RELTYP
       IP_PROPNAM             =
       I_PROPERTY             =
    IMPORTING
       EP_LINK_ID             =
       EO_PROPERTY            =
    *CATCH CX_OBL_PARAMETER_ERROR .
    *CATCH CX_OBL_MODEL_ERROR .
    *CATCH CX_OBL_INTERNAL_ERROR .
    *ENDTRY.
    Check if everything OK...who cares!!
      commit work.

    HI
    You can look at object VBAP as an example.  It'sthe sales order item and has two keys - sales order number and item number. 
    the key was created:
    BEGIN OF KEY,
         SALESDOCUMENTNO LIKE VBAP-VBELN,
         ITEMNO LIKE VBAP-POSNR,
    END OF KEY,
         MATERIAL TYPE SWC_OBJECT,
         SALESDOCUMENT TYPE SWC_OBJECT,
         _VBAP LIKE VBAP.
    ND_DATA OBJECT. " Do not change.. DATA is generated
    Here is a object instantiation - just build the key with the two fields - then when you call the macro - you pass the one field that already has both keys in it.
    GET_PROPERTY SALESDOCUMENT CHANGING CONTAINER.
      SWC_CREATE_OBJECT
        OBJECT-SALESDOCUMENT 'VBAK' OBJECT-KEY-SALESDOCUMENTNO.
      SWC_SET_ELEMENT CONTAINER 'SalesDocument' OBJECT-SALESDOCUMENT.
    END_PROPERTY.

  • Why can't we use GUI_Download in background mode...........

    Hi experts as per the requirement my program should run at specific time in background mode, it need to upload the Personal numbers from the input file and for those personal numbers extract the data from multiple tables. but this report shd run in background.
    and download the output in the form of flat file.
    as i'm running in background mode can't use the F.M GUI_Download and GUI_Upload.
    can any one guide me how to solve this issue and why can't we use these F.M. if we can't use then what is the alternative to run in background mode.

    A program that runs in background mode doesn't have any connection to a frontend. After all, you can schedule it to run at a time where your frontend computer is not running.
    In this case you have to load your files on the application server (or a mount point) and use the FMs C13Z_FILE_DOWN(UP)LOAD_ASCII(BINARY)
    Regards
    Frank

  • When attaching documents using GOS send them with workflow

    Hello experts,
    I have a scenario. We have to attach documents to SAP application using GOS. These documents can be edited also.
    Now second part is that when we attach the document or edit the document, the document should be send with the work item "when we attach the document".
    The first part of the scenario is completed and working fine. The second part of the scenario is causing problem. I have checked the various options but none of them are proving helpful.
    There is an option in GOS toolbar to send the documents through workflow but that also asks for the related workflow.
    I was trying to create an event for GOS object which can trigger the workflow automatically when the attachment are created and edited but can not go further with it as not so strong in workflow.
    I request you to kindly help me either in creating this event which will trigger the workflow (whole process) or any other method to do the same.
    Thank you all in advance.

    Hello Andrés,
    Thank you for replying. The main problem is starting the workflow. For that I need to create an event and that is my biggest trouble. I have seen the object IFSAP already. There are no events in it and as such I have created my custom object as super type.
    So I need to create the event from scratch.
    Hope my requirement is clear.
    Thank you.
    Edited by: Apoorv Lohani on Feb 3, 2012 7:54 AM

  • How to store notes using GOS functionality

    hi expert
    urgent things
    can u help me in this issue how to store note or text in repository using GOS generic object services ???
    as soon as possible .
    thank you

    Hello,
    We cannot move the notes, stored through GOS, to content server as the size of the notes is not huge.
    Only the PC attachments through GOS can be directed to content server.
    Refer to the note 530792 for more details.
    Cheers
    Amit

  • Read flat file form other than sapserver(not in sapser) in background mode

    Dear Friends,
    I want to upload data from flat file to sap in background mode.
    I know how to read file for application server in background mode, but my requirement is , i need to read the flat file data from other than sap server in backgound mode.
    please help me,
    Regards,
    prabhu

    hi
    you can do like this way.
    fist should get de directory file name.
      CALL FUNCTION 'RZL_READ_DIR_LOCAL'
        EXPORTING
          NAME           = FILE_PATH
        TABLES
          FILE_TBL       = I_FILES
        EXCEPTIONS
          ARGUMENT_ERROR = 1
          NOT_FOUND      = 2
          OTHERS         = 3.
      IF SY-SUBRC EQ 0.
        FILES_TAG = 1.
      ENDIF.
    second
       LOOP AT I_FILES.
    open datafilenaem.
    close datafilename.
    endloop.

  • Could not use the colour replacement mode

    I ofen use Elements (12 currently) to remove backbrounds.  So I ensure I have a layer and create a linked mask.  Then ensuring that the 'black' mode is selected I usually use a brush to remove the 'background' and leave it transparent.  I recently have an imported photograph which is now a layer.  Created a linked mask and tried this.  But as I put the brush on the layer it said that it couldn't do this as it was NOT in FULL COLOR MODE.  I see from a previous question that you must be in RGB mode.  So I checked on the Image -> Mode and it says I am on RGB.  I know in RGB you can have different colour depths 8 bit, 24 bit etc...  So I thought maybe it wants a higher mode?  But I can see no place to increase or decrease the colour depth?  I am new to Elements.  I looked in my Photoshop Elements 11 for dummies and that didn't help me?  Can any one tell me why on this RGB layer I cannot use the mask/tool replacement as I do normally?

    The images I have generally pulled into Photoshop are JPEG which should be in 8 bits.  When I look in their TAB they are saying /8 so they are in 8 bit mode which is why I can't convert them to 8 bit/channel I suspect because they are already 8 bit.  So why the MASK removing part of the layer image won't work I don't know?  I have used this function many times and now it won't work and it is 'driving me nuts'!  Any more ideas?

  • User exit not work in bdc background mode

    i have bdc program for creating sales order. I also use some user-exits.  When i run the program in foreground, user-exit works fine, but in background, the program can't stop in user-exit. Do you have any idea about what kind of problem can cause to this?

    Call transactions with bdc tables in Sales Orders execute the user exit code!  I've never seen user exit code excluded, unless by program code.  What do you mean by "stop" in background.  Of course, you can't make it stop there in background.
    Post relevant code and we'll see what we can tell you.  What does the code do?

  • When the apple review team review our app,they point out that our  app uses a background mode but does not include functionality that requires that mode to run persistently.but in fact,when the app in background ,the app need data update to make the

    when the apple review team review our app,they point out that our  app uses a background mode but does not include functionality that requires that mode to run persistently。but in fact,when the app in background ,the app need data update to make the function of  trajectory replay come ture。in fact, we have added function when the app  is in background mode。we have point out the point to them by email。but they still have question on the background mode,we are confused,does anyone can help me,i still don't know why do review team can't find the data update when  the app is in background and how do i modify the app,or what is the really problem they refered,do i misunderstand them?
    the blow is the content of the review team email:
    We found that your app uses a background mode but does not include functionality that requires that mode to run persistently. This behavior is not in compliance with the App Store Review Guidelines.
    We noticed your app declares support for location in the UIBackgroundModes key in your Info.plist but does not include features that require persistent location.
    It would be appropriate to add features that require persistent use of real-time location updates while the app is in the background or remove the "location" setting from the UIBackgroundModes key. If your application does not require persistent, real-time location updates, we recommend using the significant-change location service or the region monitoring location service.
    For more information on these options, please see the "Starting the Significant-Change Location Service" and "Monitoring Shape-Based Regions" sections in the Location Awareness Programming Guide.
    If you choose to add features that use the Location Background Mode, please include the following battery use disclaimer in your Application Description:
    "Continued use of GPS running in the background can dramatically decrease battery life."
    Additionally, at your earliest opportunity, please review the following question/s and provide as detailed information as you can in response. The more information you can provide upfront, the sooner we can complete your review.
    We are unable to access the app in use in "http://www.wayding.com/waydingweb/article/12/139". Please provide us a valid demo video to show your app in use.
    For discrete code-level questions, you may wish to consult with Apple Developer Technical Support. When the DTS engineer follows up with you, please be ready to provide:
    - complete details of your rejection issue(s)
    - screenshots
    - steps to reproduce the issue(s)
    - symbolicated crash logs - if your issue results in a crash log
    If you have difficulty reproducing a reported issue, please try testing the workflow as described in <https://developer.apple.com/library/ios/qa/qa1764/>Technical Q&A QA1764: How to reproduce a crash or bug that only App Review or users are seeing.

    Unfortunately, these forums here are all user to user; you might try the developer forums or get in touch with the team that you are working with.

  • Rejected by Apple because of iBeacon even though we are not using such thing

    Hello all,
    We are developing a game using Adobe Air and were rejected, here's the rejection letter:
    Reasons
    2.16: Multitasking Apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc.
    2.16
    We found that your app uses a background mode but does not include functionality that requires that mode to run persistently. This behavior is not in compliance with the App Store Review Guidelines.
    We noticed your app declares support for iBeacon in the UIBackgroundModes key in your Info.plist but does not include features that require persistent location.
    It would be appropriate to add features that require persistent use of real-time location updates while the app is in the background or remove the "location" setting from the UIBackgroundModes key. If your application does not require persistent, real-time location updates, we recommend using the significant-change location service or the region monitoring location service.
    For more information on these options, please see the "Starting the Significant-Change Location Service" and "Monitoring Shape-Based Regions" sections in the Location Awareness Programming Guide.
    If you choose to add features that use the Location Background Mode, please include the following battery use disclaimer in your Application Description:
    "Continued use of GPS running in the background can dramatically decrease battery life."
    For discrete code-level questions, you may wish to consult with Apple Developer Technical Support. When the DTS engineer follows up with you, please be ready to provide:
    - complete details of your rejection issue(s)
    - screenshots
    - steps to reproduce the issue(s)
    - symbolicated crash logs - if your issue results in a crash log
    If you have difficulty reproducing a reported issue, please try testing the workflow as described in <https://developer.apple.com/library/ios/qa/qa1764/>Technical Q&A QA1764: How to reproduce a crash or bug that only App Review or users are seeing.
    It says "We noticed your app declares support for iBeacon in the UIBackgroundModes key in your Info.plist but does not include features that require persistent location." but our info.plist file declares nothing of the sort, the file is attached at the end of this post. Upon further investigation we discovered that the following libraries, included by the compiler, declare UIBackgroundModes=[location,audio] and listeners for iBeacon:
    flexSDK/lib/aot/lib/libDebugger2.arm-air.a
    flexSDK/lib/aot/stub/UIKit.framework/UIKit
    The declarations can be seen if you look for the words UIBackgroundModes and beacon in the files.
    Is there any way not to include the declarations for iBeacon in an adobe air app that doesn't need it?
    Can you guys help us out?
    info.plist:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
        <dict>
            <key>CFBundleAllowMixedLocalizations</key>
            <true/>
            <key>CFBundleVersion</key>
            <string>1.40.0</string>
            <key>CFBundleShortVersionString</key>
            <string>1.40</string>
            <key>CFBundleIdentifier</key>
            <string>com.505games.WickedGame</string>
            <key>CFBundleInfoDictionaryVersion</key>
            <string>6.0</string>
            <key>CFBundleExecutable</key>
            <string>wicked</string>
            <key>CFBundleName</key>
            <string>WICKED Game</string>
            <key>CFBundlePackageType</key>
            <string>APPL</string>
            <key>DTCompiler</key>
            <string>com.apple.compilers.llvm.clang.1_0</string>
            <key>DTPlatformBuild</key>
            <string>11B508</string>
            <key>DTPlatformName</key>
            <string>iphoneos</string>
            <key>DTPlatformVersion</key>
            <string>7.0</string>
            <key>DTSDKBuild</key>
            <string>11B508</string>
            <key>DTSDKName</key>
            <string>iphoneos7.0</string>
            <key>DTXcode</key>
            <string>0502</string>
            <key>DTXcodeBuild</key>
            <string>5A3005</string>
            <key>LSRequiresIPhoneOS</key>
            <true/>
            <key>MinimumOSVersion</key>
            <string>6.1</string>
            <key>NSMainNibFile</key>
            <string>MainWindow</string>
            <key>NSMainNibFile~ipad</key>
            <string>MainWindow-iPad</string>
            <key>CFBundleResourceSpecification</key>
            <string>ResourceRules.plist</string>
            <key>CFBundleDisplayName</key>
            <string>WICKED Game</string>
            <key>UIStatusBarHidden</key>
            <true/>
            <key>UIViewControllerBasedStatusBarAppearance</key>
            <false/>
            <key>CTAspectRatio</key>
            <string>any</string>
            <key>renderMode</key>
            <string>direct</string>
            <key>CTRequestedDisplayResolution</key>
            <string>high</string>
            <key>DebugMode</key>
            <false/>
            <key>EnablePingback</key>
            <true/>
            <key>CTNamespaceURI</key>
            <string>http://ns.adobe.com/air/application/4.0</string>
            <key>CTAutoOrients</key>
            <true/>
            <key>CTInitialWindowTitle</key>
            <string>ios</string>
            <key>CTInitialWindowContent</key>
            <string>ios.swf</string>
            <key>CTMaxSWFMajorVersion</key>
            <string>23</string>
            <key>CFBundleSupportedPlatforms</key>
            <array>
                <string>iPhoneOS</string>
            </array>
            <key>UIStatusBarStyle</key>
            <string>UIStatusBarStyleBlackOpaque</string>
            <key>UIRequiresPersistentWiFi</key>
            <string>NO</string>
            <key>UIPrerenderedIcon</key>
            <true/>
            <key>UIApplicationExitsOnSuspend</key>
            <false/>
            <key>FacebookAppID</key>
            <string>509901862398812</string>
            <key>UIDeviceFamily</key>
            <array>
                <string>1</string>
                <string>2</string>
            </array>
            <key>CFBundleURLTypes</key>
            <array>
                <dict>
                    <key>CFBundleURLSchemes</key>
                    <array>
                        <string>fb509901862398812</string>
                    </array>
                </dict>
            </array>
            <key>iTunesAppID</key>
            <string>693001332</string>
            <key>ANEDebug</key>
            <false/>
            <key>UIRequiredDeviceCapabilities</key>
            <array>
                <string>armv7</string>
                <string>opengles-2</string>
            </array>
            <key>CFBundleIconFiles</key>
            <array>
                <string>Icon-Ipad-152.png</string>
                <string>[email protected]</string>
                <string>Icon-Iphone-120.png</string>
                <string>[email protected]</string>
                <string>Icon-Small-80.png</string>
                <string>Icon-Ipad-76.png</string>
                <string>Icon-Large.png</string>
                <string>Icon.png</string>
                <string>Icon-Small-50.png</string>
                <string>Icon-Small-40.png</string>
            </array>
            <key>UISupportedInterfaceOrientations</key>
            <array>
                <string>UIInterfaceOrientationPortrait</string>
                <string>UIInterfaceOrientationPortraitUpsideDown</string>
                <string>UIInterfaceOrientationLandscapeRight</string>
                <string>UIInterfaceOrientationLandscapeLeft</string>
            </array>
            <key>Extensions</key>
            <array>
                <string>com.hasoffers.MobileAppTracker</string>
                <string>com.sticksports.nativeExtensions.SilentSwitch</string>
                <string>com.milkmangames.extensions.RateBox</string>
                <string>com.freshplanet.AirInAppPurchase</string>
                <string>com.milkmangames.extensions.GoViral</string>
                <string>com.chartboost.plugin.air</string>
            </array>
            <key>CTAirSdkVersion</key>
            <string>14.0.0.110</string>
            <key>CTHideAneSymbols</key>
            <false/>
        </dict>
    </plist>

    FIXED (for our project at least)
    What the apple reviewer actually meant was that iBeacon was being enabled for the project but the info.plist didn't declare the use of location services which didn't make sense to them, I guess that implementations of iBeacon only make sense to apple if location services are used in the implementation. The problem with our project was that a third party ANE declared usage of iBeacon without us knowing anything about it and that was causing all the trouble. We contacted this third party and they updated the ANE. The game is up in the app store now.
    Regards

  • CJIC in background mode

    Hi,
    We are using CJIC in background mode to assign distribution rules to line items of WBS elements but are getting errors related to no batch input data though all the required data available.
    Have anyone used CJIC in background mode and faced similar problem and how did they rectified it.
    Another thing,is it advisable to use CJIC in background mode at all?
    Any help will be highly appreciated.
    Thanks,
    MTH

    Can you let me know the exact error what you are getting.
    Normaly it is advisible to run the transactions in background, where you can have better performance.
    Rgds
    Sudhir reddy

  • Download DMS attachment into an application server in background mode?

    Is it possible to download DMS attachment into an application server in background mode?
    Currently I am using the following code but does not work in background mode
      CALL FUNCTION 'CVAPI_DOC_GETDETAIL'
        EXPORTING
          pf_dokar     = 'Z06'
          pf_doknr     = gs_drad-doknr
          pf_dokvr     = gs_drad-dokvr
          pf_doktl      = gs_drad-doktl
          pf_read_kpro = 'X'
        TABLES
          pt_files      = lt_file
        EXCEPTIONS
          not_found    = 1
          no_auth       = 2
          error            = 3
          OTHERS       = 4.
    *Copy Attachment from DMS to PC File
      CALL FUNCTION 'CVAPI_DOC_VIEW'
        EXPORTING
          pf_dokar      = 'Z06'
          pf_doknr      = gs_drad-doknr
          pf_dokvr       = gs_drad-dokvr
          pf_doktl          = gs_drad-doktl
          pf_appl_start = ' '
          pf_apptp      = '1'
          pf_filename   = 'C:\TEMP\ZLINK.BMP'
          ps_file       = ls_file
        IMPORTING
          pfx_file      = l_pfx_file
        EXCEPTIONS
          OTHERS        = 0.
    *Load BMP into SE78
      PERFORM import_bitmap_bds
        IN PROGRAM saplstxbitmaps
        USING l_filename             "Local File for Upload/Download
                   l_bmpnam             "Name
                  'GRAPHICS'           "Application Object
                  'BMAP'                   "ID
                  'BCOL'                   "Color
                  'BMP'                     "Extension
                  'ZLINK PICTURE'   "Title
                  space          "Resides in Printer Memory in Print Request
                 'X'                 "Reserve Height of Graphic Automatically
                 space           "Graphic Storage: Compressed Bitmaps
        CHANGING l_docid
               l_wf_res.   "Graphic Resolution
    Thanks

    Hi!
    You didn't find answer for this, because it is not possible. If you run your program in background, it is running on the server, and does not have any connection to your local machine. That's why you can't upload/download in background mode.
    You might try to address somehow your local PC, with its IP or MAC address, but I don't think does this task worth so much time.
    Run your program in online mode, or if you want to run it in background, then upload your file into the SAP server.
    Regards
    Tamá

  • Create attachment using GOS

    Hi All,
    I am working in SAP GTS (Global trade service) project.
    My requirement is to attach a document (doc, pdf, xls, jpeg) to the customs declaration document.
    I had to do this via a report program. This program will run every night. It will attach the document for the document number created for the day.
    How do I proceed....
    I read some threads relating to this requirement, but I do I implement it in a program...
    1. First I had to do the attachment
    2. I had to link the attachment to the document no
    How to proceed... please help......

    Actually it appears that I do not have access to the system at the moment, if you send me an email(on my business card) I can get it to you in the morning.
    Also,if you are interested, the code within this function module uses alot of the code seen here, just modified to upload from a filepath/filename.
    /people/rammanohar.tiwari/blog/2005/10/10/generic-object-services-gos--in-background
    REgards,
    RIch Heilman

  • BDC is not working in background mode and working fine in Foreground mode

    Hi Experts,
    I have created a BDC in SHDB for the transaction code:CWBQM for creating and deleting the record and converted the BDC recording into the program using call transaction. It is working fine in both foreground and background. When I given the same program for users testing one for the user was able to delete the records but Creation is not working in the same BDC. He is able to create the same records in another PC and the problem is only in that PC and only during the creation of the record. When I change the mode to 'A' mode for testing and request the user to execute and it is working fine the records created successfully. What could be the issue ?
    Thanks,
    Hema

    Hello,
    While recording BDC in SHDB try setting "Simulate background mode" flag and give a try.
    Cheers,
    Nag

  • Function module not working when used with 'In Background Task'

    hi,
    this is my code
    call function 'Z_IBD_FILL_ZINETACT'
                  in background task
                  destination  'SAPD220125'
                  tables
                      it_net1 = it_net1
                      it_net2 = it_net2
                      it_net3 = it_net3  .
    when this code is executed i am not getting any data in my internal tables i.e it_net1, it_net2, and it_net3
    but i changed this code see the below code
          call function 'Z_IBD_FILL_ZINETACT'
                 in background task (THIS IS COMMENTED)
                  destination  'SAPD220125'
                  tables
                      it_net1 = it_net1
                      it_net2 = it_net2
                      it_net3 = it_net3  .
    now i am getting data into my internal tables
    can any one tell me what can be the problem and how to solve it in my case
    its very urgent

    Hi,
    Pls. go through the  docu..
    CALL FUNCTION
    Variant 5
    CALL FUNCTION func IN BACKGROUND TASK.
    Additions:
    1. ... AS SEPARATE UNIT
    2. ... DESTINATION dest
    3. ... EXPORTING  p1 = f1    ... pn = fn
    4. ... TABLES     p1 = itab1 ... pn = itabn
    Effect
    Flags the function module func to be run asynchronously. It is not executed at once, but the data passed with EXPORTING or TABLES is placed in a database table and the next COMMIT WORK executes it in another work process.
    Note
    This variant applies only as of Release 3.0, so both the client system and the server system must be Release 3.0 or higher.
    Note
    qRFC with Outbound Queue
    This is an extension of tRFC. The tRFC is serialized using queues, ensuring that the sequence of LUWs required by the application is observed when the calls are sent.
    For further information about qRFC, refer to the Serialized RFC: qRFC With Outbound Queue section of the SAP Library.
    Addition 1
    ... AS SEPARATE UNIT
    Effect
    Executes the function module in a separate LUW under a new transaction ID.
    Addition 2
    ... DESTINATION dest
    Effect
    Executes the function module externally as a Remote Function Call (RFC); dest can be a literal or a variable.
    Depending on the specified destination, the function module is executed either in another R/3 System or as a C-implemented function module. Externally callable function modules must be flagged as such in the Function Builder (of the target system).
    Since each destination defines its own program context, further calls to the same or different function modules with the same destination can access the local memory (global data) of these function modules.
    Note
    Note that a database commit occurs at each Remote Function Call (RFC). Consequently, you may not use Remote Function Calls between pairs of statements that open and close a database cursor (such as SELECT ... ENDSELECT).
    Addition 3
    ... EXPORTING p1 = f1 ... pn = fn
    Effect
    EXPORTING passes values of fields and field strings from the calling program to the function module. In the function module, formal parameters are defined as import parameters. Default values must be assigned to all import parameters of the function module in the interface definition.
    Addition 4
    ... TABLES p1 = itab1 ... pn = itabn
    Effect
    TABLES passes references to internal tables. All table parameters of the function module must contain values.
    Notes
    If several function module calls with the same destination are specified before COMMIT WORK, these normally form an LUW in the target system. Calls with the addition 1 are an exception to this rule - they each have their own LUW.
    You cannot specify type 2 destinations (R/3 - R/2 connections).
    (See Technical details and Administration transaction.)
    Example
    REPORT  RS41503F.
    /* This program performs a transactional RFC.
    TABLES: SCUSTOM.
    SELECT-OPTIONS: CUSTID FOR SCUSTOM-ID DEFAULT 1 TO 2.
    PARAMETERS: DEST LIKE RFCDES-RFCDEST DEFAULT 'NONE',
                MODE DEFAULT 'N',
                TIME LIKE SY-UZEIT DEFAULT SY-UZEIT.
    DATA: CUSTITAB TYPE TABLE OF CUST415,
          TAMESS   TYPE TABLE OF T100,
          WA_CUSTITAB TYPE CUST415.
    SELECT ID NAME TELEPHONE INTO CORRESPONDING FIELDS OF TABLE CUSTITAB
                   FROM SCUSTOM WHERE ID IN CUSTID ORDER BY ID.
    PERFORM READ_CUSTITAB.
    EDITOR-CALL FOR CUSTITAB TITLE 'Editor for table CUSTITAB'.
    PERFORM READ_CUSTITAB.
    CALL FUNCTION 'TRAIN415_RFC_CALLTRANSACTION'
         IN BACKGROUND TASK
         DESTINATION DEST
         EXPORTING
              TAMODE    = MODE
         TABLES
              CUSTTAB   = CUSTITAB.
    CALL FUNCTION 'START_OF_BACKGROUNDTASK'
         EXPORTING
              STARTDATE = SY-DATUM
              STARTTIME = TIME
         EXCEPTIONS
              OTHERS    = 1.
    IF SY-SUBRC = 1.
      EXIT.
    ENDIF.
    COMMIT WORK.
    CALL TRANSACTION 'SM58'.
          FORM READ_CUSTITAB                                   *
    FORM READ_CUSTITAB.
      WRITE: / 'System ID:', SY-SYSID.
      SKIP.
      LOOP AT CUSTITAB into WA_CUSTITAB
        WRITE: / WA_CUSTITAB-ID, WA_CUSTITAB-NAME,
                 WA_CUSTITAB-TELEPHONE.
      ENDLOOP.
      ULINE.
    ENDFORM.
    Pls. reward if useful....

Maybe you are looking for