Saving RAW field with BAPI in extensionin

Hi,
I have a web dynpro application where I have a function module which returns a field named ROLE_GUID of type raw (byte[] in java). I need to save this field in table CATSDB using bapi BAPI_CATIMESHEETMGR_INSERT, the parameter is to be passed to he function as part of the EXTENSION_IN parameter using structure BAPT_TE_CATSDB. 
What I understand is that parameters are to be passed to extension_in as fixed length strings.
My question is:
- How do I convert the raw value to a string that I can put in extension_in ?
Thanks,
Diego

Hi diego. How did you relate CATSRECORDS_IN and EXTENSIONIN, Could you provide some code snippet. I would really appreciate it

Similar Messages

  • Joining RAW field with CHAR field

    Hi fellows,
    I need to join two tables within one view. In table 1 there is a ID of RAW/16. The same value but in different type (char/70) is placed in table 2. How can I manage a join on that IDs with these tables? I tried to convert the types by using FM SCMS_TEXT_TO_BINARY. Unfortunatly this converts not only the type but also the value which has to be the exactly same after "type conversion".
    Any ideas?
    Many thanks in advance!
    Cheers
    Tobias

    Since the referring ID has to be the key field I am not able to use another one. Furthermore I cannot change the type of the RAW16 field as it is a SAP standard table.
    With which type do I fill RAW fields through Open SQL statements? Char / String doesn't work.
    Cheers
    Tobias

  • Extension fields with bapi 'BAPISORDER_GETDETAILEDLIST'

    Hello,
    I want to get values of extensions fields of vbap with bapi 'BAPISORDER_GETDETAILEDLIST'.
    Is there anyone know how to do that? How to fill extensionout table?
    Thanks.

    Hi
    I haven't that BAPI on my release (4.6C), but I suppose the parameter extensionout is like BAPIPAREX.
    The structures for extensions are:
    - BAPE_VBAK: for header
    - BAPE_VBAP: for item
    - BAPE_VBEP: for scheduls
    So BAPE_VBAP is yours.
    The system dosen't move all Z-FIELD from VBAP to BAPE_VBAP, but only fields are in structure VBAPKOZ.
    So you should insert your Z-FIELD of VBAP into VBAPKOZ.
    After I suppose the system automatically fill extensionout and so:
    LOOP AT extensionout.
    CASE extensionout-STRUCTURE.
    WHEN 'BAPE_VBAK'.
    MOVE extensionout TO BAPE_VBAK.
    WHEN 'BAPE_VBAP'.
    MOVE extensionout TO BAPE_VBAP.
    Here you can read the z-field and assign them to their *item:
      READ TABLE T_VBAP WITH KEY VBELN = BAPE_VBAP-VBELN
                                 POSNR = BAPE_VBAP-POSNR.
    WHEN 'BAPE_VBEP'.
    MOVE extensionout TO BAPE_VBEP.
    ENDCASE.
    ENDLOOP.
    Max

  • Fill exit-field with BAPI

    Hi,
    I need to fill a exit field in the header of invoice FB60  " INVFO-ZLSPR" ( bloc payement )
    using BAPI   "BAPI_ACC_INVOICE_RECEIPT_POST "
    Can any one send me exemple of code?
    best regards.

    i think that INVFO-ZLSPR  is not a exit field  but i d'not find  in th parameters of  BAPI  BAPI_ACC_INVOICE_REceipt_post
    Where can i find this field  .?

  • HOW TO SET A RAW FIELD

    Hi,
    I'd like to know how I can set a RAW field with the correspondent '10' value (for '10' i mean the byte value of '00000101').
    Is there a manner to do this at low level, without cast ?
    Thanks and best regards,
    Neil

    The string 00000101 generally represents the binary value of 5 so I am unsure of exactly what you want but maybe the following will help:
    UT1 > set echo on
    UT1 > col dumped format a30
    UT1 > drop table example;
    Table dropped.
    UT1 > create table example (fld1 varchar2(10), fld2 raw(02));
    Table created.
    UT1 > insert into example values ('Row 1',hextoraw('05'));
    1 row created.
    UT1 > insert into example values ('Row 2',hextoraw('0A'));
    1 row created.
    UT1 > select fld1, fld2, dump(fld2,16) as dumped from example;
    FLD1 FLD2 DUMPED
    Row 1 05 Typ=23 Len=1: 5
    Row 2 0A Typ=23 Len=1: a
    Being that on a big endian machine the 8 bits of a byte are 0 - 7 numbered left to right and on a little endian machine the bits are 0 - 7 right to left this may be where the confusion in your post is coming from. On my system the Oracle functions appear to follow big endian set and display patterns but I suspect that the physical byte settings match. You would need to test this by dumping the raw data on the target platform. The only difference this makes is the character value you would choose to get the bit pattern you want.
    The dbms_raw package provides varchar2 to raw and back conversion functions.
    HTH -- Mark D Powell --

  • BAPI for PO Create/Change with use of EXTENSIONIN table

    Hello,
    We are using SRM extended classic scenario which copies PO's from SRM to ECC via function module BBP_PO_INBOUND.  This function module does mappings and then calls either BAPI_PO_CREATE1 or BAPI_PO_CHANGE.  I have added field YYVSBED (char2) to structure CI_EKKODB.  When BAPI's are called this field is present in ExtensionIn structure.  While debugging the processing, I can see that it being processed, however, it does not get posted in database.
    Any suggestions are very welcome.
    Thank you.
    Natasha

    Internally the BAPI uses the the MEPO...-Structures .  Your data is lost  at the move-corresponding from the BAPI-Structure to the related MEPO... structure . If your target-field is an EKPO-Field you have to check if there is a field in the MEPOITEM -structure . 
    If you use the CI_EKPODB  to extend the EKPO with your custom field, the BAPI would work, because this is included in EKPO and MEPOITEM   .
    Best regards Josef

  • Reg: Mandatory fields updation with BAPI

    Hi..
    We are working on BDC using BAPI. In this if flat files contians only 4 fields and the mandatory fields in the application are seven then system needs to through error message. But with BAPI the program is updating the database without throwing error eventhough all mandatory fileds are not filled up with data.. Where exactly we need to do modifications to get error message when mandatory fields are not filled up with input.
    Regards

    Hi Verendra
    Sometimes the function modules/BAPI's used by SAP do a direct update on the database tables. In such scnearios the entries are created in the system even though if the mandatory entries are not filled.
    If the number of mandatory fields are small, then before the BAPI call,  check if all the mandatory fields are filled or not;throw error in case of empty fields & bypass the BAPI call.
    In case the mandatory fields are too high, then in that case, please use BDC recording to update the data.
    Regards
    Chetan
    PS:Reward points if you find this helpful.

  • How to display HTML formatted text in the field with Item Style: Raw Text

    How can I display HTML formatted text in the field with Item Style: Raw Text.
    Currently the Item Style is Raw Text, but the text is being displayed along with HTML tags without formatting.
    Regards

    Hi,
    Use Item Style formattedText.
    Regards,
    Gyan

  • When round tripping with photoshop cc, i get a saved psd file with my original raw,the problem is these are high file sizes and taking a lot of space,can i stop this?

    when round tripping with photoshop cc, i get a saved psd file with my original raw,the problem is these are high file sizes and taking a lot of space,can i stop this?

    That's not the workflow that I use. I have my Lightroom preferences set to create TIF images when going to Photoshop. I keep the original raw file and the TIF image (usually reduced to an 8-bit image) and only export JPEG's when they are needed to send to a lab or to send to someone over the Internet. JPEG files are highly compressed. I only create them when they are needed, and they are discarded as soon as they have been used for their intended purpose. I keep the raw file and the Photoshop-created TIF in my library. This requires extra disk space. But I always have the highest quality files available.

  • PLSQL join does not work with RAW fields

    Hi All, I wanna to do a join between two table which have as primary key a GUID field (RAW 16). To do this I'm creating a cursor and the sql is simple. However, it returns the following error when I try to compile the procedure:
    Error(41,3): PL/SQL: SQL Statement ignored
    Error(42,27): PL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed
    The tables and the cursor are listed below. I would like to know the best way to do a join with Raw fields in plsql once that the same query works when used out of the procedure.
         CURSOR Areas IS
    Select ha.partial, ha.acidental_burn, ha.edge_cut
    from harvest_area ha, harvest_order ho
    where ha."ORDER" = ho."ID";
    create table "HARVEST_AREA" (
    "ID" RAW(16) not null,
    "VERSION" NUMBER(10,0) not null,
    "ACCIDENTAL_BURN" NUMBER(1,0) not null,
    "AREA" DOUBLE PRECISION not null,
    "EDGE_CUT" NUMBER(1,0) not null,
    "K_FACTOR" NUMBER(1,0) not null,
    "PARTIAL" NUMBER(1,0) not null,
    "SISCONAGR_CONTROL" NUMBER(1,0) not null,
    "CUT" RAW(16) not null,
    "ORDER" RAW(16) not null,
    "PROVIDER" RAW(16) not null,
    "SHAPE" MDSYS.SDO_GEOMETRY,
    primary key ("ID")
    create table "HARVEST_ORDER" (
    "ID" RAW(16) not null,
    "VERSION" NUMBER(10,0) not null,
    "CHOPPED" NUMBER(1,0) not null,
    "CODE" NUMBER(10,0) not null,
    "FILE" NVARCHAR2(256),
    "LOAD_DISTRIBUTION" NUMBER(1,0) not null,
    "RAW_CANE" NUMBER(1,0) not null,
    "TIMESTAMP" TIMESTAMP(4) not null,
    "FACTORY" RAW(16) not null,
    "FRONT" RAW(16) not null,
    "MODE" RAW(16) not null,
    "SHAPE" MDSYS.SDO_GEOMETRY,
    primary key ("ID")
    );

    Ok, I could reproduce on my 10.2.0.4 (my first test was on 11.2.0.1):
    SQL> create table harvest_area
       id                raw (16) not null,
       version           number (10, 0) not null,
       accidental_burn   number (1, 0) not null,
       area              double precision not null,
       edge_cut          number (1, 0) not null,
       k_factor          number (1, 0) not null,
       partial           number (1, 0) not null,
       sisconagr_control number (1, 0) not null,
       cut               raw (16) not null,
       order1            raw (16) not null,
       provider          raw (16) not null,
       primary key (id)
    Table created.
    SQL> create table harvest_order
       id                raw (16) not null,
       version           number (10, 0) not null,
       chopped           number (1, 0) not null,
       code              number (10, 0) not null,
       file1             nvarchar2 (256),
       load_distribution number (1, 0) not null,
       raw_cane          number (1, 0) not null,
       timestamp         timestamp (4) not null,
       factory           raw (16) not null,
       front             raw (16) not null,
       mode1             raw (16) not null,
       primary key (id)
    Table created.
    SQL> declare
       cursor areas
       is
          select null
          from harvest_area ha,
               harvest_order ho
          where ha.order1 = ho.id;
    begin
       for c in areas
       loop
          null;
       end loop;
    end;
    Error at line 41
    ORA-06550: line 6, column 12:
    PL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 4, column 7:
    PL/SQL: SQL Statement ignoredProblem is the timestamp column in harvest_order which I think you need to rename:
    SQL> drop table harvest_area
    Table dropped.
    SQL> drop table harvest_order
    Table dropped.
    SQL> create table harvest_area
       id                raw (16) not null,
       version           number (10, 0) not null,
       accidental_burn   number (1, 0) not null,
       area              double precision not null,
       edge_cut          number (1, 0) not null,
       k_factor          number (1, 0) not null,
       partial           number (1, 0) not null,
       sisconagr_control number (1, 0) not null,
       cut               raw (16) not null,
       order1            raw (16) not null,
       provider          raw (16) not null,
       primary key (id)
    Table created.
    SQL> create table harvest_order
       id                raw (16) not null,
       version           number (10, 0) not null,
       chopped           number (1, 0) not null,
       code              number (10, 0) not null,
       file1             nvarchar2 (256),
       load_distribution number (1, 0) not null,
       raw_cane          number (1, 0) not null,
       timestamp1        timestamp (4) not null,
       factory           raw (16) not null,
       front             raw (16) not null,
       mode1             raw (16) not null,
       primary key (id)
    Table created.
    SQL> declare
       cursor areas
       is
          select null
          from harvest_area ha,
               harvest_order ho
          where ha.order1 = ho.id;
    begin
       for c in areas
       loop
          null;
       end loop;
    end;
    PL/SQL procedure successfully completed.

  • Create Material Master Data with BAPI

    Hi,
    I don't know using of BAPI. I want using BAPI_MATERIAL_SAVEDATA bapi for creating material master data for Basic Data1, Basic Data2, Purchasing and MRP views. Does anybody can help me ?
    Thank you
    Good night

    Hi,
    Please refer to the documentation below:
    BAPI_MATERIAL_SAVEDATA
    Short Text
    Create and Change Article Master Data
    Functionality
    You use this method to create new material master data or to change existing material master data. The data on a material can be transferred for each call.
    When creating material master data, you must transfer the material number, the material type, and the industry sector to the method. You must also enter a material description and its language.
    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.
    If a structure contains fields for units of measurement (such as structure CLIENTDATA, field BASE_UOM), language indicators (such as structure MATERIALDESCRIPTION, field LANGU), or country indicators (such as structure TAXCLASSIFICATIONS, field DEPCOUNTRY), there is always a field of the same name with the ending _ISO. This makes it possible to transfer either the internally used SAP code or a standardized ISO code for the units of measurement, language indicators, or country indicators. ISO codes are converted to an SAP code internally for further processing. The ISO code is used only if the SAP code is not transferred. If you use ISO codes, there must be a unique assignment of the ISO code to the SAP code in the following activities in Customizing for Global Parameters:
    Check Units of Measurement
    Define Countries
    If you want to maintain long texts (basic data texts, internal comments, purchase order texts, material memos, or sales texts) or customer-defined fields for a material, some special conditions have to be observed. They are described in the documentation for parameters MATERIALLONGTEXT and EXTENSIONIN.
    Parameters
    HEADDATA
    CLIENTDATA
    CLIENTDATAX
    PLANTDATA
    PLANTDATAX
    FORECASTPARAMETERS
    FORECASTPARAMETERSX
    PLANNINGDATA
    PLANNINGDATAX
    STORAGELOCATIONDATA
    STORAGELOCATIONDATAX
    VALUATIONDATA
    VALUATIONDATAX
    WAREHOUSENUMBERDATA
    WAREHOUSENUMBERDATAX
    SALESDATA
    SALESDATAX
    STORAGETYPEDATA
    STORAGETYPEDATAX
    FLAG_ONLINE
    FLAG_CAD_CALL
    NO_DEQUEUE
    NO_ROLLBACK_WORK
    RETURN
    MATERIALDESCRIPTION
    UNITSOFMEASURE
    UNITSOFMEASUREX
    INTERNATIONALARTNOS
    MATERIALLONGTEXT
    TAXCLASSIFICATIONS
    RETURNMESSAGES
    PRTDATA
    PRTDATAX
    EXTENSIONIN
    EXTENSIONINX
    Exceptions
    Function Group
    1001UEB
    Thanks,
    Sandeep.

  • Service PO creation with BAPI

    Hi All,
    I have to create a file upload program to create service PO's with BAPI_PO_CREATE1. Please if anyone can give me a example of it it would be great.
    Thanks.
    Malinda

    Hi ,
           Check out this program .
    use this program for creating service po's using bapi.
    *& Report ZMM_PO_CREATE1 *
    REPORT ZMM_PO_CREATE1 .
    data : POHEADER like BAPIMEPOHEADER occurs 0 with header line,
    POHEADERX like BAPIMEPOHEADERX occurs 0 with header line,
    POITEM like BAPIMEPOITEM occurs 0 with header line,
    POITEMX like BAPIMEPOITEMX occurs 0 with header line,
    POESLLC like BAPIESLLC occurs 0 with header line,
    POACCOUNT like BAPIMEPOACCOUNT occurs 0 with header line,
    POACCOUNTX like BAPIMEPOACCOUNTX occurs 0 with header line,
    POCONDHEADER like BAPIMEPOCONDHEADER occurs 0 with header line,
    POCONDHEADERX like BAPIMEPOCONDHEADERX occurs 0 with header line,
    POCOND like BAPIMEPOCOND occurs 0 with header line,
    RETURN like BAPIRET2 occurs 0 with header line.
    data : po_no(10).
    data : begin of it_head occurs 0,
    ref(10),
    bsart like ekko-bsart,
    lifnr like ekko-lifnr,
    ekorg like ekko-ekorg,
    ekgrp like ekko-ekgrp,
    bukrs like ekko-bukrs,
    verkf like ekko-verkf,
    telf1 like ekko-telf1,
    ihrez like ekko-ihrez,
    unsez like ekko-unsez,
    kdatb(10),
    kdate(10),
    end of it_head.
    data : begin of it_det occurs 0,
    ref(10),
    knttp like ekpo-knttp,
    pstyp like ekpo-pstyp,
    txz01 like ekpo-txz01,
    matkl like ekpo-matkl,
    werks like ekpo-werks,
    afnam like ekpo-afnam,
    ktext1 like esll-ktext1,
    srvpos like esll-srvpos,
    frmval1 like esll-frmval1,
    frmval2 like esll-frmval2,
    menge like esll-menge,
    kostl like eskn-kostl,
    sakto like eskn-sakto,
    zzcode like eskn-zzcode,
    kbetr like konv-kbetr,
    end of it_det.
    data : c_col1 TYPE i VALUE '0001',
    c_col2 TYPE i VALUE '0002',
    c_col3 TYPE i VALUE '0003',
    c_col4 TYPE i VALUE '0004',
    c_col5 TYPE i VALUE '0005',
    c_col6 TYPE i VALUE '0006',
    c_col7 TYPE i VALUE '0007',
    c_col8 TYPE i VALUE '0008',
    c_col9 TYPE i VALUE '0009',
    c_col10 TYPE i VALUE '0010',
    c_col11 TYPE i VALUE '0011',
    c_col12 TYPE i VALUE '0012',
    c_col13 TYPE i VALUE '0013',
    c_col14 TYPE i VALUE '0014',
    c_col15 TYPE i VALUE '0015',
    c_col16 TYPE i VALUE '0016'.
    data : v_currentrow type i,
    v_currentrow1 type i.
    data : itab_head like ALSMEX_TABLINE occurs 0 with header line,
    itab_det like ALSMEX_TABLINE occurs 0 with header line.
    data : file_head type RLGRAP-FILENAME,
    file_item type RLGRAP-FILENAME.
    file_head = 'C:Documents and SettingsDesktophead.xls'.
    file_item = 'C:Documents and SettingsDesktopitem.xls'.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
    filename = file_head
    i_begin_col = 1
    i_begin_row = 1
    i_end_col = 12
    i_end_row = 50
    tables
    intern = itab_head
    EXCEPTIONS
    INCONSISTENT_PARAMETERS = 1
    UPLOAD_OLE = 2
    OTHERS = 3
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
    filename = file_item
    i_begin_col = 1
    i_begin_row = 1
    i_end_col = 16
    i_end_row = 50
    tables
    intern = itab_det
    EXCEPTIONS
    INCONSISTENT_PARAMETERS = 1
    UPLOAD_OLE = 2
    OTHERS = 3
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF itab_head[] IS INITIAL.
    WRITE:/ 'No Header Data Exists '.
    STOP.
    ELSE.
    sort itab_head by row col.
    read table itab_head index 1.
    v_currentrow = itab_head-row.
    loop at itab_head.
    if itab_head-row ne v_currentrow.
    APPEND it_head.
    v_currentrow = itab_head-row.
    ENDIF.
    CASE itab_head-col.
    WHEN c_col1.
    it_head-ref = itab_head-value.
    WHEN c_col2.
    it_head-bsart = itab_head-value.
    WHEN c_col3.
    it_head-lifnr = itab_head-value.
    WHEN c_col4.
    it_head-ekorg = itab_head-value.
    WHEN c_col5.
    it_head-ekgrp = itab_head-value.
    WHEN c_col6.
    it_head-bukrs = itab_head-value.
    WHEN c_col7.
    it_head-verkf = itab_head-value.
    WHEN c_col8.
    it_head-telf1 = itab_head-value.
    WHEN c_col9.
    it_head-ihrez = itab_head-value.
    WHEN c_col10.
    it_head-unsez = itab_head-value.
    WHEN c_col11.
    it_head-kdatb = itab_head-value.
    WHEN c_col12.
    it_head-kdate = itab_head-value.
    ENDCASE.
    ENDLOOP.
    APPEND it_head.
    CLEAR it_head.
    ENDIF.
    IF itab_det[] IS INITIAL.
    WRITE:/ 'No Item Data Exists '.
    STOP.
    ELSE.
    sort itab_det by row col.
    read table itab_det index 1.
    v_currentrow1 = itab_det-row.
    loop at itab_det.
    if itab_det-row ne v_currentrow1.
    APPEND it_det.
    v_currentrow1 = itab_det-row.
    ENDIF.
    CASE itab_det-col.
    WHEN c_col1.
    it_det-ref = itab_det-value.
    WHEN c_col2.
    it_det-knttp = itab_det-value.
    WHEN c_col3.
    it_det-pstyp = itab_det-value.
    WHEN c_col4.
    it_det-txz01 = itab_det-value.
    WHEN c_col5.
    it_det-matkl = itab_det-value.
    WHEN c_col6.
    it_det-werks = itab_det-value.
    WHEN c_col7.
    it_det-afnam = itab_det-value.
    WHEN c_col8.
    it_det-srvpos = itab_det-value.
    WHEN c_col9.
    it_det-ktext1 = itab_det-value.
    WHEN c_col10.
    it_det-frmval1 = itab_det-value.
    WHEN c_col11.
    it_det-frmval2 = itab_det-value.
    WHEN c_col12.
    it_det-menge = itab_det-value.
    WHEN c_col13.
    it_det-kostl = itab_det-value.
    WHEN c_col14.
    it_det-sakto = itab_det-value.
    WHEN c_col15.
    it_det-zzcode = itab_det-value.
    WHEN c_col16.
    it_det-kbetr = itab_det-value.
    ENDCASE.
    ENDLOOP.
    APPEND it_det.
    CLEAR it_det.
    ENDIF.
    loop at it_head.
    poheader-doc_type = it_head-bsart.
    poheader-vendor = it_head-lifnr.
    poheader-purch_org = it_head-ekorg.
    poheader-pur_group = it_head-ekgrp.
    poheader-comp_code = it_head-bukrs.
    poheader-sales_pers = it_head-verkf.
    poheader-telephone = it_head-telf1.
    poheader-REF_1 = it_head-ihrez.
    poheader-OUR_REF = it_head-unsez.
    poheader-VPER_START = it_head-kdatb.
    poheader-VPER_END = it_head-kdate.
    loop at it_det where ref = it_head-ref.
    poitem-acctasscat = it_det-knttp.
    poitem-item_cat = it_det-pstyp.
    poitem-short_text = it_det-txz01.
    poitem-matl_group = it_det-matkl.
    poitem-plant = it_det-werks.
    poitem-PREQ_NAME = it_det-afnam.
    POESLLC-SERVICE = it_det-srvpos.
    POESLLC-SHORT_TEXT = it_det-ktext1.
    POESLLC-FORM_VAL1 = it_det-frmval1.
    POESLLC-FORM_VAL2 = it_det-frmval2.
    POESLLC-QUANTITY = it_det-menge.
    POACCOUNT-COSTCENTER = it_det-kostl.
    POACCOUNT-GL_ACCOUNT = it_det-sakto.
    POCONDHEADER-COND_TYPE = 'R000'.
    POCONDHEADER-COND_VALUE = it_det-kbetr.
    endloop.
    endloop.
    poheaderx-doc_type = 'X'.
    poheaderx-vendor = 'X'.
    poheaderx-purch_org = 'X'.
    poheaderx-pur_group = 'X'.
    poheaderx-comp_code = 'X'.
    poheaderx-sales_pers = 'X'.
    poheaderx-telephone = 'X'.
    poheaderx-REF_1 = 'X'.
    poheaderx-OUR_REF = 'X'.
    poheaderx-VPER_START = 'X'.
    poheaderx-VPER_END = 'X'.
    poitemx-acctasscat = 'X'.
    poitemx-item_cat = 'X'.
    poitemx-short_text = 'X'.
    poitemx-matl_group = 'X'.
    poitemx-plant = 'X'.
    poitemx-PREQ_NAME = 'X'.
    *POESLLCx-SHORT_TEXT = 'X'.
    POACCOUNTx-COSTCENTER = 'X'.
    POACCOUNTx-GL_ACCOUNT = 'X'.
    POCONDHEADER-cond_type = 'X'.
    CALL FUNCTION 'BAPI_PO_CREATE1'
    EXPORTING
    poheader = poheader
    POHEADERX = poheaderx
    POADDRVENDOR =
    TESTRUN =
    MEMORY_UNCOMPLETE =
    MEMORY_COMPLETE =
    POEXPIMPHEADER =
    POEXPIMPHEADERX =
    VERSIONS =
    NO_MESSAGING =
    NO_MESSAGE_REQ =
    NO_AUTHORITY =
    NO_PRICE_FROM_PO =
    IMPORTING
    EXPPURCHASEORDER = po_no
    EXPHEADER =
    EXPPOEXPIMPHEADER =
    TABLES
    RETURN = return
    POITEM = poitem
    POITEMX = poitemx
    POADDRDELIVERY =
    POSCHEDULE =
    POSCHEDULEX =
    POACCOUNT = poaccount
    POACCOUNTPROFITSEGMENT =
    POACCOUNTX = poaccountx
    POCONDHEADER = pocondheader
    POCONDHEADERX = pocondheaderx
    POCOND =
    POCONDX =
    POLIMITS =
    POCONTRACTLIMITS =
    POSERVICES = poesllc
    POSRVACCESSVALUES =
    POSERVICESTEXT =
    EXTENSIONIN =
    EXTENSIONOUT =
    POEXPIMPITEM =
    POEXPIMPITEMX =
    POTEXTHEADER =
    POTEXTITEM =
    ALLVERSIONS =
    POPARTNER =
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT =
    IMPORTING
    RETURN =
    if sy-subrc = 0.
    loop at return.
    write return-MESSAGE_V1.
    write po_no.
    endloop.
    endif.
    Also check this link
    [Service Order through BAPI|Service PO creation with BAPI;

  • ? using multiple approval signatures, each locking the fields with collections

    Having fun with LiveCycle to make a "signoff" sheet that will allow a customer to request a "new product" with a PDF form. Once that information is added to our EDR (Eng Design Request) form, I want the form to be forwarded to multiple departments, where each department manager adds their name, date, comments, and then signs the document and forwards it to the next manager. I have it set up with "locking" a "collection fields" with each signature, and that is cool to lock their comments to thier signature, such that someone else can't change their comments without first "clearing" their signature field... just what I wanted, cool,, taking it a step further, I wanted to have the original product data protected such that once signed by one, or more managers (Eng, Sales, President), that the data was locked unless all signatures were cleared. I tried this first by including the product definition fields in every signature's "collection of fields" (set to lock after signing). Thought that would be the ticket, pretty pumped to try it, but once I clear one signature, example the "Eng manager signature" I can go in and mess with the specs and then re-sign the document, and the other signatures are still there, thought I have to clear them, not good,,, 2nd try, I then tried to lock the preceeding "signature field" itself with the next signature (added "sig0" to "sig1" collection) and that worked once, but fell apart on the third approval, as clear one signature openned things right up, when it shouldn't have. Anyway, has anyone found a way to have an approval signoff sheet where once signed the data fields are locked unless all the signature(s) are cleared. I think the programming is not handing multiple locks on the sme field properly, ie all locks on that field must be removed for that field to become editable,, There may be a better way to tackle this..
    PS, I have really learned to be cautious when saving the form out of LiveCyle, then renaming it and save out or "Pro" with read permisions enabled, then see if "Reader" can open it,,, if U R not carefull you get and error that the "document has changed and reader can't save, contact the author,,," that was scary as I had to surf through lots of old revs to find one that would work again, something salvagable without going back to MSWord,,,
    Thanks for your help...

    I think I found a way to get it to do what I want,,,
    1) Use the first signature collection lock to lock only the fields that that person is signing-off on.
    2) The next manager then signs off and locks only his comments and text boxes, as well as the signature of the preceeding manager. This way text fields are only locked by one signature collection and thus to edit anything you have to clear that manager's signature to edit the related text boxes, then to re-sign that section you must clear the other (higher level) signatures to open up the signature field for resigning,,, I think this is providing the protection I want,,, Yea,,, let's get this form back into our stupid ISO system ;)

  • Adding field in bapi PO creation

    Hi experts,
    How can we add a additional field in BAPI ie. BAPI_PO_CREATE1
    we enhanced a field in PO Screen at item level, now my reqm is uploading the PO data in sap using this BAPI. How can I complete this task pls suggest me.
    regards,
    Tarun

    Hi
    [Please check this link   |BAPI_PO_CREATE1 and EXTENSIONIN structure;
    Thanks
    Edited by: subhacp on Jan 13, 2010 10:24 AM

  • Problem with BAPI invocation in UDF

    Dear SDN-Experts,
    I have the following java code in an user defined function:
    JCO.Repository mRepository;
    JCO.Client mConnection = JCO.createClient(
    "101",
    "de",
    "frba02.buc.fristo.de",
    "10" );
    mConnection.connect();
    mRepository = new JCO.Repository( "SAPLookup", mConnection );
    JCO.Function function = null;
    IFunctionTemplate ft = mRepository.getFunctionTemplate( "BAPI_MATERIAL_GET_ALL" );
    function = ft.getFunction();
    JCO.ParameterList input = function.getImportParameterList();
    input.setValue( "1000" , "MATERIAL" );
    mConnection.execute ( function );
    JCO.Table unitsofmeasure=  function.getTableParameterList().getTable("UNITSOFMEASURE");
    mConnection.disconnect();
    return unitsofmeasure.getString("ALT_UNIT_ISO");
    As you can see, I try to execute "BAPI_MATERIAL_GET_ALL" with 1000 as "MATERIAL". When I test the same BAPI in the Target System with Transaction SE37 and 1000 as material, I get a table which has three rows. But when I execute the UDF with the same parameter (as above), I get the following runtime exception:
    Exception:com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Trying to access row values in a table which does not have any rows yet in class com.sap.xi.tf._MM_MT_KASSE__to_WPUWBW01_ method GetME$ 2270, com.sap.aii.mappingtool.tf3.rt.Context@24650c7a
    Could you help me please?
    Thanks in advance.
    Cheers
    Ehsan
    Edited by: Ehsan Baghi on Jul 11, 2008 4:58 PM

    Hi Ehsan !
            By the message error that you received, I think that is possible that the bapi is returning no records in the table.
            Sometimes, call an RFC or BAPI from java has different behavior that executing from SE37, because of field formatting for example. In your case, there is great chance that executing this BAPI in SE37, when you fill the Material field with "1000", internally it´s proccessed as "000000000000001000", and when you call this BAPI from a java program, the field is proccessed with the exact value that you passed: "1000".
            A good way to check this is logon in your SAP environment with the user that you are using in the java mapping to connect to SAP, run SE37 and open the source code of this BAPI, set a remote break point, and test your mapping, so you will see in the debugger, the exact value that is arriving to the BAPI from java, and the values that is being returned to java.
            I hope this helps !
            Best regards,
            Wilson

Maybe you are looking for

  • Problem in displaying Arabic Character in Paper Layout

    Hi I am facing problem while displaying arabic characters. In Web layout i am able to get it by changing the character set to ISO-8259-6. I had changed the NLS parameters in registry as suggested in the help. But still i am unable to get. Please can

  • JMS Demo Not working!!!Very poor samples from Oracle.

    Hi i have installed the CHat JMS Sample into Oc4j. Everything was OK until i wanted to log into the chat application. Then on my oc4j consol the following occured: 03/10/04 14:49:08 javax.jms.JMSException: TopicConnection[Oc4jJMS.Connection.bak deskt

  • Duplicate records in input structure of model node

    Hi, Following is the way, I am assigning data to a model node: //Clearing the model input node for (int i = wdContext.nodeInsppointdata().size(); i > 0; i--)      wdContext.nodeInsppointdata().removeElement(wdContext.nodeInsppointdata().getElementAt(

  • Workflow for JV posting

    Hi All, Can you assist us on how the below requirement can be achieved in SAP. For specific document types, the user must not be able to post the JV, if the total amount of the document is more than specified amount limit , say 10K (local currency).

  • Q10 - New synchronizing Link Software does not synchronize

    Well, we finally have the "synchronizing update" to Link. This is greeted with a warme welcome and many happy faces, not doubt. However: - after following the instructions, the sync runs, claim to be completed, but the agendas have not swapped appoin