Any sort of bapi for SMW0 ?

I want to create a program to add images to sap web repository automatically, but I cant find any bapi for the smw0.
So far the best I've manage to do is call the FM 'UPLOAD_WEB_OBJECT' this function does create the object in the sap web repository, but has an unwanted behaviour it pot up's asking for confirmation to save.
So...is any bapi for this transaction OR a way to avoid that pop up (some kind of forced save)
thanks

indeed, restart sap solved that problem.
But something is wrong...
REPORT  zsl_teste9.
DATA: p_file_aux TYPE string.
TYPES: BEGIN OF s_file,
         data(64),
      END OF s_file.
DATA: BEGIN OF st_file,
         data(64),
      END OF st_file.
PARAMETERS: p_fserv LIKE rlgrap-filename DEFAULT '.\ac2.jpg'.
DATA: t_file LIKE st_file OCCURS 0,
      wa_file LIKE st_file.
DATA l_xstring TYPE xstring.
PERFORM download_from_server TABLES t_file."puts binary in t_file
* get any binary, here it's an SAP INFO icon in PNG format
PERFORM get_info_icon_png CHANGING l_xstring.
* load into SMW0
PERFORM create_smw0_binary_wo_dialog
      USING 'ZSLAC' 'image/jpg' 'descri' l_xstring.
COMMIT WORK.
FORM create_smw0_binary_wo_dialog
      USING
        i_w3objid     TYPE w3objid
        i_mimetype    TYPE clike
        i_description TYPE clike
        i_xstring     TYPE xstring.
* it works only if we use a package without transport request (here
* we use $TMP)
  DATA lt_html TYPE TABLE OF w3html.
  DATA lt_mime TYPE TABLE OF w3mime.
  DATA l_size TYPE i.
  l_size = XSTRLEN( i_xstring ).
  CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    EXPORTING
      buffer     = i_xstring
    TABLES
      binary_tab = lt_mime.
  CALL FUNCTION 'EXPORT_WEB_OBJECT'
    EXPORTING
      object_id          = i_w3objid
      mimetype           = i_mimetype
      text               = i_description
      size               = l_size
      devclass           = '$TMP'
    TABLES
      html               = lt_html
      mime               = lt_mime
    EXCEPTIONS
      size_not_specified = 1
      object_locked      = 2
      OTHERS             = 3.
ENDFORM.                    "create_smw0_binary_wo_dialog
FORM get_info_icon_png CHANGING e_xstring TYPE xstring.
  DATA l_temp_xstring TYPE xstring.
  CLEAR e_xstring.
  LOOP AT t_file INTO wa_file.
    l_temp_xstring = wa_file-data.
    CONCATENATE e_xstring l_temp_xstring INTO e_xstring IN BYTE MODE.
  ENDLOOP.
ENDFORM.                    "get_info_icon_p
*&      Form  DOWNLOAD_FROM_sERVER
*       text
*      -->P_T_FILE  text
FORM download_from_server  TABLES   p_t_file STRUCTURE st_file.
  CLEAR t_file.
  OPEN DATASET p_fserv FOR INPUT IN BINARY MODE.
  DO.
    READ DATASET p_fserv INTO wa_file.
    IF sy-subrc = 0.
      APPEND wa_file TO t_file.
    ELSE.
      EXIT.
    ENDIF.
  ENDDO.
  CLOSE DATASET p_fserv.
ENDFORM.                    " DOWNLOAD_FROM_SERVER
this is prety much the same code sandra posted before, but Im reading the content from an actualy jpg file.
but after doing this, im not able to see the image in smw0 (I see the code, description, etc but when I press to see the image it gives me an error. like if the file was currupted)

Similar Messages

  • Does any one knows BAPI for FPRV?

    Hi All,
    i need a BAPI for Transfer Posting of Adjusted , transaction FPRV. I need to CALL bapi from my event.
    thank you very much

    I found 2 function modules which look promising, but I'm still looking into it
    Function modules: 
    FKK_ZWFEWB_TRANSFER
    FKK_TRANSFER_MASS
    Long story short, I need to achieve the same thing Alan wanted which is to trigger FPRV from an ABAP program.

  • Does any one knows BAPI for  "Adjust Receivables  According" FPRW

    Hi All,
    Does any one knows  the BAPI or function for u201DAdjust Receivables  According  to Ageu201D 
    this process runs from  FPRW transaction.
    Obs> I dont wana events from FQEVENTS !!
    Tks,
    Every one...

    Tks !!
    This fuctions works...

  • BAPI for meter reading order (MRO) Reversal

    Hi Experts,
    Please let me know if there is any FM or BAPI for meter reading order reversal, Similar to EL37
    Regards
    Bikas

    Hello Bikas,
    Though this is an old post, thought of replying for the sake of googlers who might look for a solution for your query...the below code works!
    *---Begin Of Code
      TYPES : BEGIN OF ty_meter_orders_data,
               anlage   TYPE eablg-anlage,
               adatsoll TYPE eablg-adatsoll,
               ablesgr  TYPE eablg-ablesgr,
              END OF ty_meter_orders_data.
      DATA : lt_meter_orders_data TYPE STANDARD TABLE OF ty_meter_orders_data,
                  xy_ieabl_delete   TYPE  eabl_tab,
                  xy_ieablg_delete  TYPE  eablg_tab,
                  xy_ietrg_delete   TYPE  etrg_tab,
                  x_anlage type anlage,
                  x_retro_upd_date type adatsoll,
                  y_return type char1.
      DATA : y_obj TYPE  isu17_meterread.
    *--Get the needed data for reversal
      SELECT a~anlage
             a~adatsoll
             a~ablesgr
        FROM eablg AS a
        INNER JOIN eabl AS b ON a~ablbelnr = b~ablbelnr
        INTO TABLE lt_meter_orders_data
        WHERE a~anlage = x_anlage AND
              a~adatsoll >= x_retro_upd_date AND
              b~ablstat = '0'. "MR Order
      IF sy-subrc = 0.
        SORT lt_meter_orders_data BY anlage ablesgr adatsoll.
        DELETE ADJACENT DUPLICATES FROM lt_meter_orders_data COMPARING anlage ablesgr adatsoll.
        SORT lt_meter_orders_data BY adatsoll DESCENDING.
        LOOP AT lt_meter_orders_data ASSIGNING FIELD-SYMBOL(<fs_meter_orders_data>).
          CALL FUNCTION 'ISU_O_METERREAD_OPEN'
            EXPORTING
              x_anlage              = <fs_meter_orders_data>-anlage
              x_adatsoll            = <fs_meter_orders_data>-adatsoll
              x_ablesgr             = <fs_meter_orders_data>-ablesgr
              x_select2             = '5'
              x_wmode               = '6'
            IMPORTING
              y_obj                 = y_obj
            EXCEPTIONS
              not_found             = 1
              foreign_lock          = 2
              internal_error        = 3
              input_error           = 4
              existing              = 5
              number_error          = 6
              general_fault         = 7
              system_error          = 8
              manual_abort          = 9
              gasdat_not_found      = 10
              no_mrrel_registers    = 11
              internal_warning      = 12
              not_authorized        = 13
              not_qualified         = 14
              anpstorno_not_allowed = 15
              already_billed        = 16
              dev_already_prep      = 17
              OTHERS                = 18.
          IF sy-subrc = 0.
            CALL FUNCTION 'ISU_O_METERREAD_ACTION'
              EXPORTING
                x_okcode             = 'PSAV'
              CHANGING
                xy_obj               = y_obj
              EXCEPTIONS
                cancelled            = 1
                failed               = 2
                action_not_supported = 3
                system_error         = 4
                input_error          = 5
                not_customized       = 6
                OTHERS               = 7.
            IF sy-subrc = 0.
              CALL FUNCTION 'ISU_O_METERREAD_ACTION'
                EXPORTING
                  x_okcode             = 'SAVE'
                TABLES
                  yt_eabl_delete       = xy_ieabl_delete[]
                  yt_eablg_delete      = xy_ieablg_delete[]
                  yt_etrg_delete       = xy_ietrg_delete[]
                CHANGING
                  xy_obj               = y_obj
                EXCEPTIONS
                  cancelled            = 1
                   failed               = 2
                  action_not_supported = 3
                  system_error         = 4
                  input_error          = 5
                  not_customized       = 6
                  OTHERS               = 7.
              IF sy-subrc = 0.
                COMMIT WORK.
              ENDIF.
            ENDIF.
            CALL FUNCTION 'ISU_O_METERREAD_CLOSE'
              CHANGING
                xy_obj = y_obj.
    * Implement suitable error handling here
          ELSE.
            y_return = 'E'.
          ENDIF.
        ENDLOOP.
        IF y_return <> 'E'.
          y_return = 'S'.
        ENDIF.
      ELSE
    *    RAISE no_mtr_read_ordrs_found.
      ENDIF.
    *---End of Code
    Thanks.
    Mohammed.

  • Function module/BAPI for ATP Material

    Hi All,
    Is there any function module/BAPI for ATP(Available-to-Promise check) for Material.
    1) Production order from one plant
    2) Scheduling agreement from another plant.
    Regards,
    Srinivas.

    Hi,
    you can use either of one below for ATP.
    BAPI_MATERIAL_AVAILABILITY
    RV_AVAILABILITY_CHECK
    /SAPNEA/SMAPI_ATP_CHECK
    regards,
    ram

  • Is there any sort of guide?

    Hi,
    Is there any sort of documentation for using Itunes for Windows? I realize there is a help file, but I'd like to be able to print something out.
    Thanks,
    Al

    urslow, you have posted in the Mac forum, you may want ot re-post in the Windows forum.

  • FM or BAPI for Transfer Order creation in eWM

    Hello ALL,
    Please provide any FM or BAPI for Transfer Order creation in eWM. i know how to create transfer order in ERP.I tried to find out a FM or BAPI in SCM eWM but failes to get one.
    Kindly help.
    BR,
    Anil..

    Hi,
    Try using FM WS_LM_TRANSFER_ORDER_CREATE.
    I hope this is available in ur system
    Thanks

  • Can u tell me any predefined BAPI for change and creation of Material

    Hi,
        Can anybody tell me  predefined BAPI for change and creation of Materialmasterand Pricing?
    Thanks & regards,
    Gopianne.

    you can use the BAPI to BAPI_MATERIAL_SAVEDATA create as well as to change material master.
    When changing material master data, you need enter only the material
    number.
    In the header data, you must select at least one view for which data is
    to be created. Depending on the view selected, you must maintain other
    required parameters. If you do not enter values for all of the required
    parameters, the method is ended with an error message.
    The corresponding fields in the tables (such as CLIENTDATA) must first
    be supplied with data by the calling program. An indicator must also be
    set for each of these fields so that the data is written to the database
    by the method. This requires the calling program to supply the
    corresponding field with the indicator in a checkbox table (for example,
    CLIENTDATAX). Checkbox tables exist for tables that do not contain any
    language-dependent texts (MAKT, MLTX), International Article Numbers
    (MEAN), or tax classifications (MLAN). Several data records for a
    material can be created in these tables.
    regards
    vivek
    reward points if it helps

  • Is there any Bapi for Physical Sample creation

    Hi Folks,
    Is there any Bapi for physical sample creation. My scenario is like this I have the data in the table (material, plant, batch, type,vendor, vendorbatch ). For each material i have to create a  physical sample......
    Any ideas or suggestions would be appreciated..
    thanks
    chaithanya.

    HI Chaitanya,
    You can use : BAPI_BATCH_CREATE
    it has import paramaters like Material, Plant , batch , Batch Attributes ( Vendor No, Vendor Batch etc)... I guess this is what you are looking for.
    Regards,
    -Venkat.

  • Any BAPI for Auto clearing of Vendor accounts

    Hai,
    Any body know, any BAPI for Auto clearing of the Vendor account(transaction F.13).
    This urgent issue.
    Reward will promote you.
    Bye ,
    Elamaran

    no, there's no bapi
    -> another report is rfbibl00 with transaction fb05
    -> you've to fill structures bselk and bselp
    regards Andreas

  • BAPI's for Transaction Manager: Is there any BAPI for Stock Options

    Hi gurus,
    We are using almost every BAPI for Transaction Manager module at FSCM-Treasury & Risk Management (ECC 6.0).
    We have forex swaps, forex forwards, forex spot deals, interest rate swaps, cross currency swaps, equity swaps, and we also have a stock options plan.
    We need to use a BAPI to automatically create stock options, importing data from other stock options alreaedy created (manually, by the user) in the system.
    Do you know if there is any specific functionality for this?
    Thanks in advance and kind regards.
    Borja

    Hi Borja,
    if I understand you correct then you want to create a stock option like you can do it manually with the transaction FWZZ. Try the BAPI BAPI_FP_CREATEFROMDATA. With this function module it is possible to create different types of securities like listed options or futures too.
    Regards
    Robert

  • Any FM/Bapi/program to find BAPIs for tcodes?

    Hi,
    Is there any program or BAPI or FM  to find all the BAPIs that are used in Tcode.
    Thanks
    Ganesh

    There is no such report, and it will be hard (via ABAP) to determine which BAPI should be used for a certain transaction. These BAPI's are normally not used in transactions since these BAPI's are to be called from remote systems. So there is no 'where used'  for this.
    So to determine this will be very very hard. A long shot, not even sure this will work:
    1. Determine BAPI's called from IDoc's.
    2. Determine function module which is called from within BAPI.
    3. Simulate the 'where used' functionality in other programs.
    4. Check if any of these programs have a transaction code attached to it.
    As I said, very hard, if not impossible.
    BTW: Are you looking for BAPI's or BADI's? Big difference.
    Edited by: Micky Oestreich on Mar 6, 2009 6:22 PM

  • Are there any standard Idocs or Bapis for posting the data into transaction

    Hi,
    Are there any standard Idocs or Bapis for posting the data into transactions ME42N and IK11?
    Thank You.

    Thank you.
    Any idea of the other one?

  • Is there any BAPI for BOM creation? which does by RCSBI010 / Batch Input.

    Hi Experts,
    I need to Upload the extracted Excel-file(.txt) for BOM creation, so, pls, let me know that, Is there any BAPI for this purpose. In detail the requirement is that,
    The suggested idea shuld work as like as pgm. RCSBI010
    thanq
    Edited by: Srinivas on Feb 14, 2008 6:18 PM

    Hi Srinivas,
    Try these Function Modules
    CS_BI_BOM_CREATE_BATCH_INPUT   - Create BOM Via Batch Input
    CS_BI_BOM_CREATE_BATCH_INPUT1  - Create BOM Via Batch Input (Corrected Session Handling)
    There are two BAPI's too, which can be used
    ALE_MATERIAL_BOM_GROUP_CREATE
    BAPI_MATERIAL_BOM_GROUP_CREATE - Creation of a material BOM group
    Hoe this helps.
    Edited by: Priyabrata Samanta on Feb 15, 2008 3:56 AM

  • Any IDoc/BAPI for Loading Material Determination Condition records - VB11??

    Hi All,
    I need to load the material determination condition records which can be done through the transaction VB11. I dont want to do load the records through BDC.
    So, I am looking for any IDoc or BAPI which can do this job.
    Any help in this regard is highly appreciated.
    Points will be awarded for all useful replies.
    Thanks in advance,
    Surendra K

    hi surendra,
    i have a exact same task to load material determination to SCM
    "load the material determination condition records which can be done through the transaction VB11. I dont want to do load the records through BDC, i am looking for any IDoc or BAPI which can do this job"
    thank you
    sridhar K

Maybe you are looking for

  • Software update hangs after upgrading to Lion

    Just recently upgraded to Lion, mostly without any glitches but upon starting up iTunes I was presented with a dialog box indicating that the version of iTunes was "too new" (I think) and suggested I used Software Update to install a Lion compatible

  • PDF display accurate page size in Full Screen Mode

    Mac G5 Tower Panther OS. When making a PDF presentation to a client (an A4 brochure for example) I would like to use the Full Screen mode using my remote to change pages and make a smooth impression. The problem is on my Apple 20' Cinema display the

  • 0fiscper Fiscal Yr / P required to be converted to 0fiscper3 posting period

    Hi I need a quick help, please resolve my issue in step by step. Report is required to display the 0 fiscper3 (posting period)and 0fiscyear (fiscal year) in bw report. I have a  0fiscper Fiscal Yr / Period in my datasource and infosource but not 0fis

  • Query Operator "IS" is not working good for object type "String"

    Hi, I have a problem with advanced search. When the object type is String, and I want to search directly value (for exemple 'a') i have returned all value starts with 'a', even though I set Query Operator to "IS" When I use Query operator "setByUser"

  • Adobe Form Hanging in WDA

    Hi All, I have a requirement in my current development to display the list of HR forms(Payroll) to the end client. I am successfully able to carry out the scenario for a single Record Type but when I use the multiple scenario the Adobe Form keeps han