Force creation of new segment

Hello all,
I have a problem with a map.
In the ORIGIN schema, I have fields :
ShipmentStatus
LOCCode
DeliveryCode
In the DESTINATION Schema :
LOC (with it's several child fields)
I'm creating 1 LOC based in the values of ShipmentStatus and LOCCode and it works fine. It shows in the final file.
Now I need to create a second LOC, right next to the first one, if the DeliveryCode is filled in and fill the rest of the LOC child fields using some "String Concatenate".
What happens it that it only create 1 LOC and mixes the values of the 2 LOC in just one.
Offcourse it the gives an error because the resulting LOC does not have the correct format.
I've tried putting a Looping connecting the DeliveryCode to the LOC , hoping it would create the second instance of LOC but it makes that no LOC at all appears in the final file.
In the Destination schema, LOC the MaxOccurs and MinOccurs properties are not defined and I can't change them.
Does that mean unlimited occurrences?

Well,
I got to the point where I have the 2 LOC fully mixed....
LOC+9+7+USMSY+MACAS:139:139:6:6'
Now I just have to figure out , how to split it in two LOC.....
Any ideas?

Similar Messages

  • Adding new segment in IDOC

    Hi,
           i have a requirement where based on a condition i need to add a new segment dynamically in Inbound IDOC.
    I have written the code in the user exit of the inbound FM. Its adding new segments and process it perfectly.
    But when i see the IDOC in we02 or we19, i am not able to see the newly added segment.
    Will the newly added segment in FM appear in the We02?
    PS: i have changed the idoc_control-maxsegnum.
    Regards,
    Niyaz

    Hi Niyaz,
    Check out the below program ....Similar to your requirement
    IDoc creation from inbound file
    REPORT ZS7BM000006 message-id ZS7.
    */ Program Name: Creation of DESADV & INVOIC IDocs from file E021
    */ Description : This program reads in external file E021 containing
    *                shipping and invoice data from internal vendors and
    *                creates one DESADV and one INVOIC IDoc per invoice.
    */ Transaction : n/a - run from job Z_ccc_S7B_Annnnn, where
    *                'ccc' = 3-digit client and 'nnnnn' = zero-filled
    *                sequence number matching the scheduled job for E020.
    tables:  lfa1,
             lfm1,
             ekpo,
             eine,
             e1edk01,
             e1edk02,
             e1edk07,
             e1edk08,
             e1edk06,
             e1edk03,
             e1edka1,
             e1edka2,
             e1edp07,
             e1edp09,
             e1edp19,
             e1edp01,
             e1edp02,
             e1edp26,
             e1edp04,
             e1eds01,
             e1eds02,
             zst7f_ty_vendors.
    parameters:  p_path like PATH-PATHEXTERN
                       default '/ftp/atac/in/'.
    data:  INFILE LIKE PATH-PATHEXTERN,
           back_path(7) type c value 'backup/',
           offset like sy-fdpos,
           p07_ctr like sy-index,
           invoice_total type p decimals 3,
           d_seg_num like sy-index,
           i_seg_num like sy-index.
    data:  OUTFILE LIKE PATH-PATHEXTERN,
           today(8)     type c.
    data:  begin of uty_vendors occurs 10,
              lifnr like lfa1-lifnr,
              waers like lfm1-waers,
              name_abbr like zst7f_ty_vendors-name_abbr,
              ship_days like zst7f_ty_vendors-ship_days,
           end of uty_vendors.
    data:  iZSS7B21 like ZSS7B21.
    data:  desadvdata like edi_dd occurs 5 with header line.
    data:  invoicdata like edi_dd occurs 5 with header line.
    data:  dedidc like edi_dc occurs 1 with header line.
    data:  iedidc like edi_dc occurs 1 with header line.
    data:  begin of ie021 occurs 10,
            lifnr            like lfa1-lifnr,
            ship_days        like zst7f_ty_vendors-ship_days,
            invoice_no       like e1edk08-vbeln,
            stat             like e1edk01-action,
            po_number(10)    type n,
            po_lineno(5)     type n,
            slip_number      like e1edp09-vbeln,
            shipto_id        like e1edka1-partn,
            vendor_id        like e1edka1-partn,
            endcust_name     like e1edka1-name1,
            cust_partno      like e1edp09-kdmat,  "char 35
            vendor_partno    like e1edp09-matnr,  "char 35
            invoice_qty      like e1edp09-lfimg,
            qty_uom          like e1edp01-menee,
            unit_price       like e1edp01-vprei,
            price_uom        like e1edp01-pmene,
            price_qty        like e1edp01-peinh,
            line_amount      like e1edp26-betrg,
            currency         like e1edk01-curcy,
            etd              like e1edk06-datum, "ship date
            eta              like e1edk06-datum, "delivery date
            ship_id          like e1edk08-traid,
            ship_method      like e1edk08-traty,
            create_date      like e1edk03-datum,
            plant            like ekpo-werks,
           end of ie021.
    data: save_po like ie021-po_number,
          save_line like ie021-po_lineno,
          save_stat like ie021-stat,
          save_invoice like ie021-invoice_no.
    constants: hun_thou type p decimals 5 value '100000',
               thou type p decimals 3 value '1000'.
    *&      DEFINITION:  append_idoc_rec
    *       add a data record to the IDoc internal table
    define append_idoc_rec.
    &1-tabnam = &1-segnam.
    &2_seg_num = &2_seg_num + 1.
    &1-segnum = &2_seg_num.
    shift &1-segnum left deleting leading space.
    append &1.
    clear &1.
    end-of-definition.       " append_idoc_rec
    * MAIN PROCESSING LOOP
    START-OF-SELECTION.
    today = sy-datum.
    * find all internal vendors
    select a~lifnr
           b~waers
           c~name_abbr  c~ship_days
       into corresponding fields of table uty_vendors
         from lfa1 as a
              inner join lfm1 as b
                 on a~lifnr = b~lifnr
              inner join zst7f_ty_vendors as c
                 on a~lifnr = c~lifnr
         where a~ktokk = 'ZZTY' and
               b~ekorg = '7100' and
               c~ship_code = ' '.
    perform init_desadv.
    perform init_invoic.
    concatenate 'SAP' sy-sysid(3) into: iedidc-sndpor, dedidc-sndpor.
    loop at uty_vendors.
      clear ie021. refresh ie021.
      if not uty_vendors-name_abbr is initial.
    * datafiles are received with naming convention:
    * E020_<customer name abbreviation>_UTY
        concatenate p_path 'E021_' uty_vendors-name_abbr '_UTY'
            into infile.
        if not sy-subrc is initial.  "pathname too long
    * Filename too long: &
          message i016 with infile.
          continue.
        endif.
        condense infile.
        OPEN DATASET INFILE FOR INPUT IN TEXT MODE.
        if not sy-subrc is initial.
    *'Cannot open dataset & on &'
          message i013 with infile sy-datum.
          continue.
        else.
          concatenate p_path back_path 'E021_'
              uty_vendors-name_abbr '_UTY' today
                    into outfile.
          if not sy-subrc is initial.  "pathname too long
    * Filename too long: &
            message i016 with outfile.
            continue.
          endif.
          condense outfile.
          OPEN DATASET OUTFILE FOR OUTPUT IN TEXT MODE.
    * if the datestamped file cannot be created, do not process the
    * input file, because the input file is deleted after processing,
    * and there would be no record of the data.
          if not sy-subrc is initial.
    *'ERROR opening file & for output'
            close dataset infile.
            message i033 with outfile.
            continue.  "process next vendor's file
          endif.
          do.
            read dataset infile into izss7b21.
            case sy-subrc.
              when 0.
                transfer izss7b21 to outfile.
                if izss7b21-datacode = 'T'. "trailer rec
                  perform process_one_vendor using infile.
                  exit.  "process next vendor's file
                endif.
                check: izss7b21-datacode = 'A'. "data rec
                case izss7b21-status.
                  when ' '.  "new
                    ie021-stat = '000'.
                  when 'M'.  "modification
                    ie021-stat = '002'.
                  when 'D'.  "deletion
                    ie021-stat = '003'.
                endcase.
                move-corresponding uty_vendors to ie021.
                move-corresponding izss7b21 to ie021.
                perform convert_po_no using izss7b21-pono_poline
                                   changing ie021-po_number
                                            ie021-po_lineno.
                perform convert_dates using ie021-lifnr
                                            izss7b21-etd
                                            izss7b21-eta
                                            izss7b21-ship_method
                                            izss7b21-create_date
                                   changing ie021-eta
                                            ie021-ship_days.
                perform quantity_conversion
                                    using izss7b21-qty_uom
                                          izss7b21-invoice_qty
                                          izss7b21-unit_price
                                    changing ie021-qty_uom
                                             ie021-invoice_qty
                                          izss7b21-line_amount.
                perform money_conversion
                                    using izss7b21-currency
                                          izss7b21-unit_price
                                          izss7b21-price_uom
                                          izss7b21-line_amount
                                    changing ie021-currency
                                             ie021-price_uom
                                             ie021-price_qty
                                             ie021-unit_price
                                             ie021-line_amount.
                perform SAP_vendor_partno
                                    changing ie021-cust_partno.
                append ie021.
              when 4.  "EOF
                perform process_one_vendor using infile.
                exit.  "process next vendor's file
              when others.
    *ERROR reading dataset & - &
                message i015 with infile sy-datum.
                exit.
            endcase.
          enddo.
          close dataset: infile, outfile.
          delete dataset infile.
        endif.
      endif.
    endloop. "UTY_VENDORS
    *&      Form  process_one_vendor
    *       Pre-processed records from one vendor file are now in the
    *       internal table ie021 - ready to create IDocs
    FORM process_one_vendor using value(infile).
      sort ie021 by invoice_no stat po_number po_lineno.
      loop at ie021.
        if ( ie021-invoice_no <> save_invoice or
             ie021-stat <> save_stat ).
          if sy-tabix > 1.
            perform post_idocs using ie021-stat.
          endif.
          perform idoc_header_segs using ie021-stat.
        endif.
        if ( ie021-stat <> save_stat or
             ie021-po_number <> save_po or
             ie021-po_lineno <> save_line or
             ie021-invoice_no <> save_invoice ).
          if ( sy-tabix > 1 and
               ie021-stat = '000' ).
            perform idoc_poheader_segs.
          endif.
        endif.
        perform idoc_item_segs using ie021-stat.
        save_po = ie021-po_number.
        save_line = ie021-po_lineno.
        save_invoice = ie021-invoice_no.
        save_stat = ie021-stat.
      endloop.
      perform post_idocs using ie021-stat.
    * File successfully processed: &
      message s035 with infile.
    ENDFORM.                    " process_one_vendor
    *&      Form  convert_po_no
    *       Break the PO number & line field into separate fields
    FORM convert_po_no using value(infield)
                       changing po_number like ie021-po_number
                                po_line like ie021-po_lineno.
    data:  cpos like sy-fdpos,
           lpos like sy-fdpos,
           cline(6) type c.
    * if the infield contains a hyphen, assume that the preceding characters
    * represent the po number, if they are numeric. The po line number is
    * assumed to be all numeric characters after the hyphen.
      if infield ca '-'.
        if infield(sy-fdpos) co ' 0123456789'.  "numeric
          po_number = infield(sy-fdpos).
          cpos = sy-fdpos + 1.
        endif.
      else.  "no hyphen - PTY
        if infield(2) = '71'.  "SAP number range
          cpos = 10.
        else.                  "SyteLine number
          cpos = 6.
        endif.
        if infield(cpos) co ' 0123456789'.  "numeric
          po_number = infield(cpos).
        endif.
      endif.
      if not po_number is initial.
        while infield+cpos(1) co '0123456789'.
          cline+lpos(1) = infield+cpos(1).
          lpos = lpos + 1.
          cpos = cpos + 1.
        endwhile.
        shift cline left deleting leading '0'.
        if not cline is initial.
          po_line = cline.
        endif.
      endif.
    * Put out a warning in the job log, but create the IDoc to save the data
      if ( po_number is initial or
           po_line is initial ).
    * PO number - line item conversion failed: &
        message i034 with infield.
      endif.
    ENDFORM.                    " convert_po_no
    *&      Form  convert_dates
    *       Convert ship date to delivery date, if necessary
    FORM convert_dates using value(vendor_no)
                             value(i_ship_date)
                             value(i_delivery_date)
                             value(i_ship_code)
                             value(i_create_date)
                    changing o_delivery_date
                             ship_days.
    data:  ship_date type d.
    * if delivery date not sent, calculate it from ship date plus
    * ship days.
    * Note that this logic could leave delivery date blank,
    * if ship date is not numeric.
      if ( i_delivery_date is initial or
           i_delivery_date co ' 0' ).  "no delivery date sent
        if ( i_ship_date co ' 0123456789' and
             i_ship_date cn ' 0' ).    "ship date sent
    * move the ship date into a date field to add days
          ship_date = i_ship_date.
        elseif ( i_create_date co ' 0123456789' and
                 i_create_date cn ' 0' ).
          ship_date = i_create_date.
        endif.
        if not i_ship_code is initial.
          select single ship_days from zst7f_ty_vendors
                   into ship_days
                  where lifnr = vendor_no
                    and ship_code = i_ship_code.
        endif.
        if not ship_date is initial.
          if ship_days > 0.
            ship_date = ship_date + ship_days.
            o_delivery_date = ship_date.
            shift o_delivery_date left deleting leading ' '.
          endif.
        endif.
      else.  "delivery date sent
        o_delivery_date = i_delivery_date.
      endif.
    ENDFORM.                    " convert_dates
    *&      Form  quantity_conversion
    *       The quantities in the input file are implied 3-decimal,
    *       so need to be converted into a "real" number.
    *       Also, the unit of measure may be 'KP' indicating that the qty
    *       is given in thousands.
    FORM quantity_conversion USING    value(i_UOM)
                                      value(i_invoice_qty)
                                      value(i_unit_price)
                        CHANGING o_uom like iE021-qty_UOM
                                 o_invoice_qty like IE021-INVOICE_QTY
                                 c_LINE_AMOUNT like izss7b21-line_amount.
    data:  f_invoice_qty type f.
    data:  n_invoice_qty like lips-kcmeng.
    data:  f_unit_price type f.
    data:  f_line_amt type f.
    data:  n_line_amt0 type p decimals 0.
      if ( i_invoice_qty co ' 0123456789' and
           i_invoice_qty cn ' 0' ).
        f_invoice_qty = i_invoice_qty.
    * if no extended price is sent, calculate it
        if c_line_amount is initial.
    * the qty is implied 3-dec, the price is still implied
    * 5-dec, and line amount should be implied 3-dec.
          f_unit_price = i_unit_price.
          f_line_amt = ( f_invoice_qty * f_unit_price ) / 100000.
          n_line_amt0 = f_line_amt.
          c_line_amount = n_line_amt0.
          shift c_line_amount left deleting leading space.
        endif.
    * if the invoice qty is per 1000, the implied 3-dec times 1000 equals
    * the unconverted value. Otherwise, divide by 1000 to get the PCE qty
        if i_uom = 'KP'.
          n_invoice_qty = f_invoice_qty.
        else.
          n_invoice_qty = f_invoice_qty / thou.
        endif.
      endif.
      o_uom = 'PCE'.
      if not n_invoice_qty is initial.
        o_invoice_qty = n_invoice_qty.
        shift o_invoice_qty left deleting leading space.
      else.
        clear o_invoice_qty.
      endif.
    ENDFORM.                    " quantity_conversion
    *&      Form  money_conversion
    *       Add the implied decimals and store price-per qty, if
    *       price per 1,000 is sent.
    FORM money_conversion USING    value(I_CURR)
                                   value(i_UNIT_PRICE)
                                   value(i_UOM)
                                   value(i_LINE_AMOUNT)
                          CHANGING o_CURRENCY like ie021-currency
                                   o_PRICE_UOM like ie021-price_uom
                                   o_PRICE_QTY like ie021-price_qty
                                   o_UNIT_PRICE like ie021-unit_price
                                   o_LINE_AMOUNT like ie021-line_amount.
    data:  n_unit_price type p decimals 5,
           n_line_amount type p decimals 3.
    * not all of the vendors send the currency code, so use the vendor
    * master default
      case i_curr(2).
        when 'US'.
          o_currency = 'USD'.
        when 'JP'.
          o_currency = 'JPY'.
        when others.
          o_currency = uty_vendors-waers.
      endcase.
    * unit price is implied 5-dec
      if ( i_unit_price cn ' 0' and
           i_unit_price co ' 0123456789' ).
        n_unit_price = i_unit_price.
        n_unit_price = n_unit_price / hun_thou.
      endif.
    * line price is implied 3-dec
      if ( i_line_amount co ' 0123456789' and
           i_line_amount cn ' 0' ).
        n_line_amount = i_line_amount.
        n_line_amount = n_line_amount / thou.
      endif.
    * 'KP' = price per thousand
      if i_uom = 'KP'.
        o_price_qty = '1000'.
      else.
        o_price_qty = '1'.
      endif.
      o_price_uom = 'PCE'.
      if not n_unit_price is initial.
        o_unit_price = n_unit_price.
        shift o_unit_price left deleting leading space.
      else.
        clear o_unit_price.
      endif.
      if not n_line_amount is initial.
        o_line_amount = n_line_amount.
        shift o_line_amount left deleting leading space.
      else.
        clear o_line_amount.
      endif.
    ENDFORM.                    " money_conversion
    *&      Form  SAP_vendor_partno
    *       replace UTY part number sent by vendor with SAP material no.
    *       from PO line item.
    FORM SAP_vendor_partno changing cust_partno like ie021-cust_partno.
    tables: makt.
    data: partno_sent like makt-maktx.
      partno_sent = cust_partno.
      clear: makt, cust_partno.
      select single matnr from ekpo into cust_partno
             where ebeln = ie021-po_number and
                   ebelp = ie021-po_lineno.
      if sy-subrc is initial.
    *compare material description to part number sent by vendor
        select single maktx from makt into makt-maktx
            where matnr = cust_partno.
        if partno_sent <> makt-maktx.
    * 'Part No. Mismatch: PO & - &, Part sent &, SAP mat.no. &'
          message i031 with ie021-po_number ie021-po_lineno
                            partno_sent makt-maktx.
        endif.
      else.  "PO line not found
    *try to find SAP material number using 20-char catalog no. sent
        select single matnr from makt into cust_partno
            where maktx = partno_sent.
        if not sy-subrc is initial.
    * 'SAP material no. not found for & - PO & - &'
          message i032 with partno_sent ie021-po_number ie021-po_lineno.
        endif.
      endif.
    *if not found, IDoc will go to workflow for missing material no.
    ENDFORM.                    " SAP_vendor_partno
    *&      Form  idoc_header_segs
    *       create internal table entries for header segments.
    *  DESADV:
    *          E1EDK07
    *          E1EDKA1
    *          E1EDK03
    *          E1EDK08
    *          E1EDKA2
    *          E1EDK06
    *  INVOIC:
    *          E1EDK01
    *          E1EDKA1(s)
    *          E1EDK02
    *          E1EDK03(s)
    FORM idoc_header_segs using value(desadv_ok).
    * INVOIC
      clear i_seg_num.
      invoicdata-segnam = 'E1EDK01'.
      e1edk01-action = ie021-stat.
      if ie021-currency(2) = 'US'.
        e1edk01-curcy = 'USD'.
      else.
        e1edk01-curcy = 'JPY'.
      endif.
      invoicdata-sdata = e1edk01.
      append_idoc_rec invoicdata i.
      clear e1edka1.
      invoicdata-segnam = 'E1EDKA1'.
      e1edka1-parvw = 'RE'.
      e1edka1-partn = ie021-shipto_id.
      invoicdata-sdata = e1edka1.
      append_idoc_rec invoicdata i.
      clear e1edka1.
      invoicdata-segnam = 'E1EDKA1'.
      e1edka1-parvw = 'LF'.
      e1edka1-partn = ie021-lifnr.
      e1edka1-lifnr = ie021-shipto_id.
      invoicdata-sdata = e1edka1.
      append_idoc_rec invoicdata i.
      if not ie021-endcust_name is initial.
        clear e1edka1.
        invoicdata-segnam = 'E1EDKA1'.
        e1edka1-parvw = 'WE'.
        e1edka1-name1 = ie021-endcust_name.
        invoicdata-sdata = e1edka1.
        append_idoc_rec invoicdata i.
      endif.
      clear e1edk02.
      invoicdata-segnam = 'E1EDK02'.
      e1edk02-qualf = '009'.
      e1edk02-belnr = ie021-invoice_no.
      invoicdata-sdata = e1edk02.
      append_idoc_rec invoicdata i.
      clear e1edk03.
      invoicdata-segnam = 'E1EDK03'.
      e1edk03-iddat = '012'.
      e1edk03-datum = ie021-create_date.
      invoicdata-sdata = e1edk03.
      append_idoc_rec invoicdata i.
      invoicdata-segnam = 'E1EDK03'.
      e1edk03-iddat = '024'.
      invoicdata-sdata = e1edk03.
      append_idoc_rec invoicdata i.
      check desadv_ok = '000'.
    * DESADV
      clear d_seg_num.
      desadvdata-segnam = 'E1EDK07'.
      e1edk07-action = ie021-stat.
      e1edk07-bolnr = ie021-invoice_no.
      desadvdata-sdata = e1edk07.
      append_idoc_rec desadvdata d.
      clear e1edka1.
      desadvdata-segnam = 'E1EDKA1'.
      desadvdata-sdata = e1edka1.
      append_idoc_rec desadvdata d.
      clear e1edk03.
      desadvdata-segnam = 'E1EDK03'.
      desadvdata-sdata = e1edk03.
      append_idoc_rec desadvdata d.
      clear e1edk08.
      desadvdata-segnam = 'E1EDK08'.
      e1edk08-vbeln = ie021-invoice_no.
      e1edk08-traid = ie021-ship_id.
      e1edk08-traty = ie021-ship_method.
      desadvdata-sdata = e1edk08.
      append_idoc_rec desadvdata d.
      clear e1edka2.
      desadvdata-segnam = 'E1EDKA2'.
      desadvdata-sdata = e1edka2.
      append_idoc_rec desadvdata d.
      clear e1edk06.
      desadvdata-segnam = 'E1EDK06'.
      e1edk06-iddat = '025'.  "document date
      e1edk06-datum = ie021-create_date.
      desadvdata-sdata = e1edk06.
      append_idoc_rec desadvdata d.
      if not ie021-eta is initial.
        clear e1edk06.
        desadvdata-segnam = 'E1EDK06'.
        e1edk06-iddat = '001'.  "delivery date
        e1edk06-datum = ie021-eta.
        desadvdata-sdata = e1edk06.
        append_idoc_rec desadvdata d.
      endif.
      if not ie021-etd is initial.
        clear e1edk06.
        desadvdata-segnam = 'E1EDK06'.
        e1edk06-iddat = '010'.  "ship date
        e1edk06-datum = ie021-etd.
        desadvdata-sdata = e1edk06.
        append_idoc_rec desadvdata d.
      endif.
    ENDFORM.                    " idoc_header_segs
    *&      Form  idoc_poheader_segs
    *       create internal table entries for DESADV PO/item segments
    *          E1EDP07
    FORM idoc_poheader_segs.
    *DESADV
      clear e1edp07.
      desadvdata-segnam = 'E1EDP07'.
      e1edp07-bstnk = ie021-po_number.
      e1edp07-posex = ie021-po_lineno.
      desadvdata-sdata = e1edp07.
      append_idoc_rec desadvdata d.
      p07_ctr = p07_ctr + 1.
    ENDFORM.                    " idoc_poheader_segs
    *&      Form  idoc_item_segs
    *       create internal table entries for PO item segments:
    *          DESADV:   E1EDP09
    *          INVOIC:   E1EDP01        Qtys
    *                    E1EDP02        ref nos. (PO number / line)
    *                    E1EDP19        part numbers
    *                    E1EDP26        amounts
    *                    E1EDP04        taxes
    FORM idoc_item_segs using value(desadv_ok).
    data:  n_line_amt  type p decimals 3.
    *INVOIC
      clear e1edp01.
      invoicdata-segnam = 'E1EDP01'.
      e1edp01-menee = ie021-qty_uom.
      e1edp01-menge = ie021-invoice_qty.
      e1edp01-vprei = ie021-unit_price.
      e1edp01-pmene = ie021-price_uom.
      e1edp01-peinh = ie021-price_qty.
      e1edp01-netwr = ie021-line_amount.
      invoicdata-sdata = e1edp01.
      append_idoc_rec invoicdata i.
      clear e1edp02.
      invoicdata-segnam = 'E1EDP02'.
      e1edp02-qualf = '001'.
      e1edp02-belnr = ie021-po_number.
      e1edp02-zeile = ie021-po_lineno.
      invoicdata-sdata = e1edp02.
      append_idoc_rec invoicdata i.
      clear e1edp19.
      invoicdata-segnam = 'E1EDP19'.
      e1edp19-qualf = '001'.
      e1edp19-idtnr = ie021-cust_partno.
      invoicdata-sdata = e1edp19.
      append_idoc_rec invoicdata i.
      clear e1edp19.
      invoicdata-segnam = 'E1EDP19'.
      e1edp19-qualf = '002'.
      e1edp19-idtnr = ie021-vendor_partno.
      invoicdata-sdata = e1edp19.
      append_idoc_rec invoicdata i.
      clear e1edp26.
      invoicdata-segnam = 'E1EDP26'.
      e1edp26-qualf = '003'.
      e1edp26-betrg = ie021-line_amount.
      invoicdata-sdata = e1edp26.
      append_idoc_rec invoicdata i.
    * dummy tax seg
      clear e1edp04.
      invoicdata-segnam = 'E1EDP04'.
      e1edp04-msatz = '0.00'.
      invoicdata-sdata = e1edp04.
      append_idoc_rec invoicdata i.
      n_line_amt = ie021-line_amount.
      invoice_total = invoice_total + n_line_amt.
      check desadv_ok = '000'.
    *DESADV
      clear e1edp09.
      desadvdata-segnam = 'E1EDP09'.
      e1edp09-vbeln = ie021-slip_number.
      e1edp09-matnr = ie021-vendor_partno.
      e1edp09-vrkme = ie021-qty_uom.
      e1edp09-lfimg = ie021-invoice_qty.
      desadvdata-sdata = e1edp09.
      append_idoc_rec desadvdata d.
    ENDFORM.                    " idoc_item_segs
    *&    Form  post_idocs
    *     create database IDocs from the idocdata tables and clear tables.
    FORM post_idocs using value(desadv_ok).
    *INVOIC
      clear e1eds01.
      invoicdata-segnam = 'E1EDS01'.
      e1eds01-sumid = '010'.
      e1eds01-summe = invoice_total.
      e1eds01-waerq = ie021-currency.
      shift e1eds01-summe left deleting leading space.
      invoicdata-sdata = e1eds01.
      append_idoc_rec invoicdata i.
      CALL FUNCTION 'INBOUND_IDOC_PROCESS'
        TABLES
          IDOC_CONTROL       =  iedidc
          IDOC_DATA          =  invoicdata.
      commit work.
    *DESADV
      if desadv_ok = '000'.
        clear e1eds02.
        desadvdata-segnam = 'E1EDS02'.
        e1eds02-sumid = '001'.
        e1eds02-summe = p07_ctr.
        shift e1eds02-summe left deleting leading space.
        desadvdata-sdata = e1eds02.
        append_idoc_rec desadvdata d.
        CALL FUNCTION 'INBOUND_IDOC_PROCESS'
          TABLES
            IDOC_CONTROL       =  dedidc
            IDOC_DATA          =  desadvdata.
        commit work.
      endif.
      refresh: desadvdata,
               invoicdata.
      clear:
        desadvdata,
        invoicdata,
        p07_ctr,
        invoice_total,
        save_stat,
        save_po,
        save_line,
        save_invoice.
    ENDFORM.                    " post_idocs
    *&      Form  init_desadv
    *       add a DESDAV control record and initialize fields
    FORM init_desadv.
    clear dedidc. refresh dedidc.
    * initialize control record:
    move:  '2'        to  dedidc-direct,
          'DESADV01'  to  dedidc-doctyp,
          'DESADV'    to  dedidc-mestyp,
          'F'         to  dedidc-std,
          'E021'      to  dedidc-stdmes,
          'LS'        to  dedidc-sndprt,
          'TY_VENDORS' to dedidc-sndprn,
          sy-datlo    to  dedidc-credat,
          sy-timlo    to  dedidc-cretim.
    append dedidc.
    ENDFORM.              " init_desadv
    *&      Form  init_invoic
    *       add a INVOIC control record and initialize fields
    FORM init_invoic.
    clear iedidc. refresh iedidc.
    * initialize control record:
    move:  '2'        to  iedidc-direct,
          'INVOIC01'  to  iedidc-doctyp,
          'INVOIC'    to  iedidc-mestyp,
          'MM'        to  iedidc-mescod,
          'F'         to  iedidc-std,
          'E021'      to  iedidc-stdmes,
          'LS'        to  iedidc-sndprt,
          'TY_VENDORS' to iedidc-sndprn,
          sy-datlo    to  iedidc-credat,
          sy-timlo    to  iedidc-cretim.
    append iedidc.
    ENDFORM.              " init_invoic
    REWARD POINTS IF HELPFUL
    Lakshmiraj.A

  • CUP - Issue regarding creation of New SAP ID in CUP.

    System :  SAP GRC 5.3 SP 12..
    We have requirement where in we need to design a workflow for creation of New SAP ID.
    The Naming convention followed for SAP ID is FIRST LETTER of FIRST NAME and LAST NAME with maximum 8 characters.
    For Eg
    JOHN SMITH would have SAP ID as JSMITH
    JERRY SMITH would  have SAP ID as  JSMITH01
    The requirement here is when user fill the REQUEST FORM for NEW User ID there is field where in the requestor need to put the desired SAP ID,
    Can a validation be set OR Logic be written so that user can put the SAP ID as per the naming convention..?
    Also , any other solution as to how the situtation can be handled in CUP...
    Regards.
    Ajit

    Hi Ajit,
    Yes, you can maintain the user ID in the Active Directory. User id will be now auto populated in the request form, from Active Directory when  we data Source is LDAP -Actice directory. So when user login to end user form to create a request, It's all information( user details + manager details ) will fetched from Active Directory.
    It is not possible to change userid in later stage of approval in the request.
    You can have security as final stage and guide them to create user manually as per naming convention.
    Make auto provisioning OFF in CUP
    Kind Regards,
    Srinivasan

  • Creation of new domains in weblogic

    Hi All,
    I need to create two new domain in weblogic.
    It should be start & stop from the admin console.
    How to do that. What is node manager?
    Just assigning the managed server with machine will do the start and stop from admin console. ?

    creation of new domain in weblogic

  • EA-FIN New Depreciation - How to restrict creation of 'new intervals' ?

    Hi Everyone,
    We have turned on the EA-FIN Business Function Extension and are wondering if there is a way to restrict the creation of new intervals using company codes.  We have three companies in our SAP system and want only one of them to be able to create new intervals.  Is there a standard way to do this or only be development?  All ideas are welcome!
    So far we tried to search if there is an Authority Object, which could be used to apply this restriction with no luck.  Could it be done using Validations?
    Thanks in advance,
    Erne

    why would you want this? intervals are just a technical item...  so long as the numbers are correct and the calculation is logical to follow, why would you care?
    you can probably achieve this by:
    1 - immediately blocking every asset record so that no other postings can be made
    2 - not allowing any time-dependent changes to occur. this might be possible via authorization or you could remove the time intervals button via a simple screen modification
    but I don't understand why this is wanted.

  • Strategy 82----How to stop creation of New Production Order

    Hi All,
    My client is facing problem with the material which having Strategy 82- Assembly to Order,  As when they make a sales order  , w,.r.t that a Production order is made automatically by system,. User complete the production process and deliver this material , now when ever the Sales user change "Credit Block: in that particular sales order again a New production order created to this sales order, How to control his creation of new Production order? As if new production Order create it brakes the link between Sales order and the previous Production order which is already in delivered status.
    Your Prompt response will be appreciated.

    HI ,
    I am closing this thread , as I know how to got a control on trhis, As of behaviour, startegy 82 says every time u change in sales order it will create a new Production order during saving, if the previous order is not been in ONLY REL status.   So the only option to control this is in S.O ,change the Item category to "CN" i.e NO MRP when if required there has been any modification to S .O.  In std SAP system item catageory has to be congiured , in SPRO SALES we can do the necessary settings.

  • How to approve creation of new identities

    Hi,
    I have created an approval process for the creation of new identities based on the how-to-guide for role approvals.
    My idea is to determine all approvers in a script which gets the entry reference as parameter from ToIdentityStore pass.
    However, for some reason, the entry reference is empty.
    Any ideas what am I doing wrong?
    Here is the script:
    function nsn_getNSNApproversFromCompanyAddress(Par){
    var entryReference = Par;
    uErrMsg(1, "entry reference: " + entryReference);
    var idStore = uGetIDStore();
    var companyAddress = uIS_GetValue(entryReference, idStore, "MXREF_MX_COMPANY_ADDRESS");
    uErrMsg(1, "company address: " + companyAddress);
    var nsnApprovers = uIS_nGetValues(companyAddress, "MX_APPROVERS");
    if (nsnApprovers.indexOf("!ERROR")>= 0)
         uErrMsg(1, "ERROR: " + nsnApprovers);
    return nsnApprovers;
    uErrMsg(1, "entry reference: " + entryReference) does not print out any value for entry reference
    And here is the destination tab content of the ToIdentityStorePass:
    MSKEYVALUE     %MSKEYVALUE%
    MX_APPROVERS     $FUNCTION.nsn_getNSNApproversFromCompanyAddress(%MX_ENTRY_REFERENCE%)$$
    Thanks in advance for your help,
    Elmar

    Hm, from what the error output message tells me it looks like MX_ENTRY_REFERENCE does not contain ANY value.
    uErrMsg(1, "entry reference: " + entryReference); generates this output: 'entry reference: '
    May this be due to the fact that this is a creation process and the identity to be created is not yet stored anywhere? If so, what would be the correct way to implement an approval process for identity creation?
    In the destination tab, MX_PENDING_VALUE is defined, as in the how-to-guide manager approval example.
    Thanks & Br,
    Elmar

  • Creation of new internal delivery channel using AQ

    Hi,
    I wanted to route one of Trading partner data to a different queue.(no want to use existing queues - IP_IN /IP_OUT queue).
    This needs to create a new delivery channel using AQ in B2B.
    I have gone thru the steps & entered all entries, but I am not able to find any queues created in B2B schema.
    Do I need to create a queue using PL/SL in B2B to make it available as internal delivery channel or this setup itself will create a queue in B2B?
    PFA the entirs:
    for transport parameters
    - transport server (B2B server IP)
    - Protocol as AQ
    -URI - b2b.<uri_name> (name of Queue, wanted to create)
    - Hostname
    - Port
    -SID - b2b
    -consumer - b2buser
    - receiptient - null
    -Polling interval - 6000
    Transport server details:
    Host name - (IP)
    IP - Host IP
    username -
    Pswd - for B2B schema
    Any pointers will be a great help.
    Regards,
    MS

    As mentioned by TH in the above post, first thing is to create the data type that is used for messages - IP_MESSAGE_TYPE. This data type will already be present in the B2B database and could be reused.
    For a new data type you could do the following.
    ==============================================================
    Create a new data type using the following
    ==============================================================
    create type IP_MSG_TYPE as OBJECT (
         MSG_ID VARCHAR2(128),
         INREPLYTO_MSG_ID VARCHAR2(128),
         FROM_PARTY VARCHAR2(512),
         TO_PARTY VARCHAR2(512),
         ACTION_NAME VARCHAR2(512),
         DOCTYPE_NAME VARCHAR2(512),
         DOCTYPE_REVISION VARCHAR2(512),
         MSG_TYPE INT,
         PAYLOAD CLOB,
         ATTACHMENT BLOB
    Once you have created a new Data type ( or are reusing the existing data type), you need to create Queue Table that will hold the Outbound and Inbound message queues. The existing Queue table is "IP_QTAB" which can again be reused.
    For new Queue table you could do the following
    ==============================================================
    Create a new Queue Table using the following
    ==============================================================
    execute dbms_aqadm.create_queue_table (     queue_table => 'MY_QTAB',
                             queue_payload_type => 'IP_MSG_TYPE',
                             multiple_consumers => FALSE);
    If you need to reuse the datatype change the queue_payload_type to 'IP_MESSAGE_TYPE'.
    Once we have the Queue Table that will hold the queues, we need to add and start the queues that are to be used for the inbound and outbound messages.
    ==============================================================
    Create the new Queues into the Queue Table using the following
    ==============================================================
    execute dbms_aqadm.create_queue (queue_name => 'B2B.MY_OUT_QUEUE', queue_table => 'B2B.MY_QTAB');
    execute dbms_aqadm.create_queue (queue_name => 'B2B.MY_IN_QUEUE', queue_table => 'B2B.MY_QTAB');
    execute dbms_aqadm.start_queue(queue_name => 'B2B.MY_OUT_QUEUE', dequeue => TRUE, enqueue => TRUE);
    execute dbms_aqadm.start_queue(queue_name => 'B2B.MY_IN_QUEUE', dequeue => TRUE, enqueue => TRUE);
    If you are reusing the queue table IP_QTAB for creation of new queues, then reference that for the queue_table in above commands.
    You need to reference the queue_name eg. B2B.My_OUT_QUEUE in the B2B UI screen.
    Hope this helps.
    AKT

  • Creation of new condition type: MWST

    Hi, Everyone.
    I would like to ask for some help regarding this issue: Creation of new condition type: MWST with the following details:
    1. For the country French Polynesia, Create a new VAT condition of 10%.
    2. Create a new one called : Class : Z u2013 Designation : France : TOM corresponding to 10 % of VAT to be invoiced
    and then associate this new VAT code u201CZu201D to the applicant Nr 221860
    If you could provide me a step by step process on how to resolve this, it would be very much appreciated.  Thank you so much.

    Hello
    What type of condition type you want.
    It is always advisable to create a new conditon type copying a standard condition type.
    For gross price condition types select PB00/PBXX
    For freight charges, Copy FRA1/FRB1
    Regards

  • PMS: Creation of new tabs for reference elements of ENHANCE BADis

    Dear Experts,
    I am on a PMS EHP5 implementation (for all practical purposes, it's an EHP4 implementation as we are not using the pre-defined template) and have the below problem.
    I have the ENHANCE_FIX and ENHANCE_FREE BADIs included at the VA level (as the requirement is to create immediate child objects for the template through these BADIs). I have a reference element (VB) defined for these BADIs.
    Example template (L1 = Level 1, L2 = Level 2, L3 = Level 3):
    L1 - VA
    ---- L2 - VB1
    --------- L3 VC1
    --------- L3 VC2
    ---- L2 - VB2
    ---- L2 - VB3
    In the above example template, the ENHANCE* BADIs will add VBs (example: VB4 and VB5) at the L2 level (appearing in the document below VB2 and VB3).
    The requirement is to have separate tabs for each VB at the L2 level (so I will have one tab for VA and 5 tabs for VB from the above example).
    I am unable to specify creation of new tabs for the reference element VB when I carry out my tabs and process configuration.
    I have not been able to find any information on this aspect either. Would appreciate any help that can come my way.
    Thanks.

    Thanks Maurice.
    I still feel that the product should leave that option to the designer of the solution. There are a lot of solutions which can get chaotic. If designed appropriately, I guess this chaos can be controlled.
    At the very least, I am sure that I have not left anything out in configuration. I will raise this with SAP over a CSS.
    Thank you for your input.

  • Creation of new tab

    Hi Guy's,
    creation of new infotype we are using Transation code:PM01, when we enter this TS it displays differnt tabs like : Create infotype,infotype version, Screen structure..   presnt require ment is to enhance the one tab to that TS.(Ex: create the one custom infotype like Employee Details, when ever we press the Eployeedetails tab it displays the related field list). Pease  help me how to proceed this senario.
    Thanks and Regrads,
    Sai.
    Edited by: sai shanhu on Apr 7, 2008 8:44 AM

    Sai shanhu, 
    Creating Infotypes for PA and PD using PM01.
    1. Infotypes should be started between 9000 – 9999
    2. Go to transaction code PM01.->select Create infotype
    3. Give the Infotype number on the screen 9010
    4. Click on the Button Generate Objects right to the Infotype input field.
    5. It asks for the Creation of the PS9010 structure for infotype. Create, save and activate and come back remaining things will be created automatically. Remaining things means Module pool program, User interface, BADI.
    6. Maintain infotype characteristics ex: Time constraints, Subtype, assigning single screen & list screen and save.
    7. Select Screen radio button and give 2000 on input field and press edit button .It takes you to the SE51 screen painter. Here we have to write logic for the validations for the fields on the Infotype screen.
    Creating subtypes for the infotype
    1. Create subtype field in the PS structure of the infotype table.
    2. Go to PM01 and press on technical attributes button and select infotype for which subtype should be maintained and display in change mode and enter Subtype field, T591A (Subtype table), T591T (Subtype text table), T591A (Time constraint table) tables and save and exit.
    3. Go to SM30 and enter V_T591A and press maintain. Enter subtype numbers and its text and save.
    I hope that it helps u .
    Regards,
    Venkat.O

  • Auto Creation of new requisitions based on a list of items

    Auto Creation of new requisitions based on a list of items
    We are starting discussions to determine how we could auto-create requisitions based on a list of servers in order to perform periodic health checks. 
    One approach we thought about was creating one service request that could spawn multiple requests, again based on a list and using a set schedule (weekly, monthly, quarterly, yearly, etc.)
    Has anyone implemented this and can provide some guidance/tips?

    You can check this article for more references on how to use sp_helptext object_name stored procedure:
    http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/
    I also suggest trying commercial tools to sync and compare the stored procedures between two databases. We used
    ApexSQL Diff, but I've also heard some good things about
    Devart's tools.

  • Automate Creation of new items in EBS

    Hey everyone -
    Just a question ,
    we want to automate creation of new items in our system.
    Our view is something like -
    1. user GUI to request a new item, according to predefined templates.
    2. Users fill a few fields of information.
    3. Item manager gets notified and approves item is needed.
    4. Automation to run batch and create everything relevant. (org assignment, item KFF, category assignments, BOMs etc). As much automation as possible, we can map template behaviour, variety is small.
    I was wondering if there is any product supporting such behaviour.
    I looked into Oracle's APC, and it seems like it doesnt do enough. Besides as far as I noticed it relies mostly on Item Catalog attributes which we don't. Also Im not sure if this product is "alive" coz oracle bought AGILE for PLM.
    Does anyone know of a product that supports creation of new items and is flexible to fit our needs?
    We want to make sure we're not missing something before we develop custom code for that.
    Thanks,
    Aaron

    Hi,
    This is prom PIM to Oracle
    I have done an interface which creates an item in master and child .Which assighns category set on iots level controls .It inserts item into all active subinventories.
    It notifies the end user with email any item already exits and error .
    Regarding templates.
    it assigs compatible templates at master and org leve.These are predefined and are not validated in program
    Edited by: Sankuratri on Apr 5, 2009 10:02 PM

  • Creation of new Sales order

    Hi,
           While creating a new Sales Order(tcode VA01) depending on the material, Item category will be generated and depending on the Item category purchase requisition screen(ME51n) will be automatically opened and PR will be created.
    Now to automate this process, BAPI_SALESORDER_CREATEFROMDAT1 will be called to create the sales order. But the requirement is that we need to pass Requisitioner and Vendor to the BAPI for creation of PR.
    But in this BAPI there is no option/field to pass Requisitioner and Vendor. So is there any other BAPI/Function Module where a new Sales order is created and also we can pass Requisitioner and Vendor required for creation of new PR.

    REPORT  ZSALESORDER.
    Parameters
    Sales document type
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
    PARAMETERS: p_auart TYPE auart OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Sales organization
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
    PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Distribution channel
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
    PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Division.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
    PARAMETERS: p_spart TYPE spart OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SKIP 1.
    Sold-to
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
    PARAMETERS: p_sold  TYPE kunnr OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Ship-to
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
    PARAMETERS: p_ship  TYPE kunnr OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SKIP 1.
    Material
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
    PARAMETERS: p_matnr TYPE matnr   OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Quantity.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
    PARAMETERS: p_menge TYPE kwmeng  OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Plant
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
    PARAMETERS: p_plant TYPE werks_d .
    SELECTION-SCREEN END OF LINE.
    Complete Deliver
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text10 FOR FIELD p_autlf.
    PARAMETERS: p_autlf TYPE autlf DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    Data declarations.
    DATA: v_vbeln            LIKE vbak-vbeln.
    DATA: header             LIKE bapisdhead1.
    DATA: headerx            LIKE bapisdhead1x.
    DATA: item               LIKE bapisditem  OCCURS 0 WITH HEADER LINE.
    DATA: itemx              LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
    DATA: partner            LIKE bapipartnr  OCCURS 0 WITH HEADER LINE.
    DATA: return             LIKE bapiret2    OCCURS 0 WITH HEADER LINE.
    DATA: lt_schedules_inx   TYPE STANDARD TABLE OF bapischdlx
                             WITH HEADER LINE.
    DATA: lt_schedules_in    TYPE STANDARD TABLE OF bapischdl
                             WITH HEADER LINE.
    DATA: lt_schedules_ink    TYPE STANDARD TABLE OF bapisdhead1
                             WITH HEADER LINE.
    Initialization.
    INITIALIZATION.
    v_text   = 'Order type'.
    v_text1  = 'Sales Org'.
    v_text2  = 'Distribution channel'.
    v_text3  = 'Division'.
    v_text4  = 'Sold-to'.
    v_text5  = 'Ship-to'.
    v_text6  = 'Material'.
    v_text7  = 'Quantity'.
    v_text9  = 'Plant'.
    v_text10 = 'Complete delivery'.
    Start-of-selection.
    START-OF-SELECTION.
    Header data
    Sales document type
      header-doc_type = p_auart.
      headerx-doc_type = 'X'.
    Sales organization
      header-sales_org = p_vkorg.
      headerx-sales_org = 'X'.
    Distribution channel
      header-distr_chan  = p_vtweg.
      headerx-distr_chan = 'X'.
    Division
      header-division = p_spart.
      headerx-division = 'X'.
      headerx-updateflag = 'I'.
    *Complete delivery
        header-COMPL_DLV = p_autlf.
        header-COMPL_DLV = 'X'.
    Partner data
    Sold to
      partner-partn_role = 'AG'.
      partner-partn_numb = p_sold.
      APPEND partner.
    Ship to
      partner-partn_role = 'WE'.
      partner-partn_numb = p_ship.
      APPEND partner.
    ITEM DATA
      itemx-updateflag = 'I'.
    Line item number.
      item-itm_number = '000010'.
      itemx-itm_number = 'X'.
    Material
      item-material = p_matnr.
      itemx-material = 'X'.
    Plant
      item-plant    = p_plant.
      itemx-plant   = 'X'.
    Quantity
      item-target_qty = p_menge.
      itemx-target_qty = 'X'.
    item category
      itemx-ITEM_CATEG = 'X'.
      APPEND item.
      APPEND itemx.
      ITEM DATA
      itemx-updateflag = 'I'.
    Line item number.
      item-itm_number = '000020'.
      itemx-itm_number = 'X'.
    Material
      item-material = p_matnr.
      itemx-material = 'X'.
    Plant
      item-plant    = p_plant.
      itemx-plant   = 'X'.
    Quantity
      item-target_qty = p_menge.
      itemx-target_qty = 'X'.
      APPEND item.
      APPEND itemx.
      Fill schedule lines
      lt_schedules_in-itm_number = '000010'.
      lt_schedules_in-sched_line = '0001'.
      lt_schedules_in-req_qty    = p_menge.
      APPEND lt_schedules_in.
      Fill schedule line flags
      lt_schedules_inx-itm_number  = '000010'.
      lt_schedules_inx-sched_line  = '0001'.
      lt_schedules_inx-updateflag  = 'X'.
      lt_schedules_inx-req_qty     = 'X'.
      APPEND lt_schedules_inx.
      Fill schedule lines
      lt_schedules_in-itm_number = '000020'.
      lt_schedules_in-sched_line = '0001'.
      lt_schedules_in-req_qty    = p_menge.
      APPEND lt_schedules_in.
      Fill schedule line flags
      lt_schedules_inx-itm_number  = '000020'.
      lt_schedules_inx-sched_line  = '0001'.
      lt_schedules_inx-updateflag  = 'X'.
      lt_schedules_inx-req_qty     = 'X'.
      APPEND lt_schedules_inx.
    Call the BAPI to create the sales order.
      CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
           EXPORTING
                sales_header_in     = header
                sales_header_inx    = headerx
           IMPORTING
                salesdocument_ex    = v_vbeln
           TABLES
                return              = return
                sales_items_in      = item
                sales_items_inx     = itemx
                sales_schedules_in  = lt_schedules_in
                sales_schedules_inx = lt_schedules_inx
                sales_partners      = partner.
    Check the return table.
      LOOP AT return WHERE type = 'E' OR type = 'A'.
        EXIT.
      ENDLOOP.
      IF sy-subrc = 0.
        WRITE: / 'Error in creating document'.
      ELSE.
    Commit the work.
        COMMIT WORK AND WAIT.
        WRITE: / 'Document ', v_vbeln, ' created'.
      ENDIF.

  • Trx. MM41: Creation of new article data

    Hi togehter,
    I've a special question regarding tax data proposal in the area of SAP Retaill - Creation of new article data.
    We've distribution centers in different countries.
    If I create a new article masterdata for a sales organization assigned to Austria and a distribution center
    assigned to Italy I get the following tax data proposal (if I enter '1' in field MARA-TAKLV):
    IT     Italy     MWST     Output tax               1     Full tax    
    IT     Italy     LCIT        VAT license Italy      1    Full tax    ->     error: the category LCIT does not define classification 1 (only 0)
    I assume that the entry LCIT comes from table TSKM.(material taxes).
    Now my question.
    We don't need the entry LCIT. It is possible or it is the right way to delete the entry named before?
    Or should we create a new entry?
    Thanks in advance for your help/info.
    Best regards
    Frank

    Moved from SAP ERP SD Sales to SAP for Retail.  Please try to post in the right forum to get right direction to your requirement / issue.  Also go through the following blog which will help you.
    Find Topic Spaces on SCN (Forums)
    G. Lakshmipathi

Maybe you are looking for

  • Error in Control Framework in smart forms programms

    IN VF02 smartforms ENTRY form , I add a function about save PDF at local PC. When I print the smartfomrs,There is ERROR message in update modules. IN SM13 can see the ERROR message.  Function Module: RV_MESSAGE_UPDATE Status :Update was terminated Er

  • Mail to File Scenario

    HI, The scenario is like I am reading data from the attachment of an email using mail sender adapter and creating a file at unix server. Please provide me any good links which gives step by step configuration.

  • Third Party Vendor - Start Up

    We are starting to use third party vendors and payroll has been running for a year. Is there a way to pay 2009 first quarter taxes using third party vendors without payting the benefit vendors, other vendors, or garnishment vendors?  I tried to run t

  • Global employees (MGE) error in ESS

    Hi all, I am in the process of activating management of global employees in ESS. The leave screens & leave balances work fine for employees with 2 PERNR i.e. i get the pop-up box in ESS. The problem i have is with the address and bank screens. I get

  • ITunes will not download purchased songs on an authorised computer.

    Hey there, I bought a few songs on my laptop through iTunes around a year ago. Since then, my laptop has been wiped and a new OS has been installed. I went to authorise my computer, but it said it was already authorised. I have not reached my maximum