Executing Transacction F111 in backgroud

Hello to all !
I need to know if is possibel executing F111 in background, (create parameter, create porposal and execute proposal).
I tryed to use shdb, but doesn't work, because in the firts step, create parameter - Automatic payment Transaction for Payment Request, i need to put the key number in Dinamic Selection.
I look for bapis, user-exits and BTE but I didn´t find anything.
If any one has done someting like this, please tell me.
Best regard's,
EFonseca

Check the OSS Note 301600 and also see https://websmp205.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=011000358700004289631999E
Kanagaraja L
Edited by: Kanagaraja  Lokanathan on Aug 31, 2009 12:58 PM

Similar Messages

  • Changing layout at runtime, executing background job and sending mail inXLS

    Hi
    When i execute my program in foregroung by manually changing value of s_job = 'X' in debugging mode it is sending the correct XLS file via mail with all the data , whereas  when i execute my program in backgroud mode it sends incomlete XLS file via mail, it has only first 2 records in any layout........can anybody please help in this regard....
    program is as follows...
    REPORT ZPMACR01_MD_MRP_100.
    *& Report :  ZPMACR01_MD_MRP_100
    TABLES : MARA, MARC, MAKT, MBEW,MARD.
    MAIL data declarations
    TABLES : adr6 , sscrfields.
    DATA: BEGIN OF mbody OCCURS 0,
          message(100),
          END OF mbody.
    DATA: BEGIN OF addresses OCCURS 0,
          addresses(100),
          END Of addresses.
    FIELD-SYMBOLS: <f> type ANY,
                   <tab> TYPE STANDARD TABLE,
                   <wa> type ANY.
    DATA: count TYPE i value 0,
          col_1 TYPE i.
    DATA: new_table TYPE REF TO data, "pointer to dynamic table
          new_line  TYPE REF TO data. "pointer to work area of dynamic table
    DATA: s_job TYPE c.
    DATA: i_data_out_text TYPE string OCCURS 0 WITH HEADER LINE.
    DATA: message TYPE string OCCURS 0 WITH HEADER LINE.
    DATA:  it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
           WITH HEADER LINE.
    DATA:  BEGIN OF it_attach OCCURS 0,
             line(2650) TYPE c,
           END OF it_attach.
    DATA:   t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
            t_hex LIKE solix OCCURS 0 WITH HEADER LINE,
            t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
            w_cnt TYPE i,
            w_sent_all(1) TYPE c,
            w_doc_data LIKE sodocchgi1,
            gd_error    TYPE sy-subrc,
            gd_reciever TYPE sy-subrc.
    ALV data declarations
    TYPE-POOLS: SLIS.
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
           IT_FIELDCAT2 TYPE LVC_T_FCAT,
           IT_FIELDCAT_FIN TYPE LVC_T_FCAT,
           IT_FIELDCAT3 TYPE SLIS_T_FIELDCAT_ALV,
           itab1 TYPE SLIS_T_FIELDCAT_ALV,
           W_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
           W_REPID TYPE SY-REPID,
           IT_LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA: is_fieldcat LIKE LINE OF it_fieldcat.
    DATA: is_fieldcat2 LIKE LINE OF it_fieldcat2,
    Is_FIELDCAT3 LIKE LINE OF it_fieldcat3.
    Data: variant type  DISVARIANT,
          v_size LIKE sy-tabix.
    ALV Data
    DATA:
           i_sort TYPE slis_t_sortinfo_alv,
           v_lvc_title   TYPE lvc_title,
           v_repid       LIKE sy-repid,
           c_user_command TYPE slis_formname  VALUE 'ALV_USER_COMMAND',
           gt_list_top_of_page TYPE slis_t_listheader,
           gt_list_end_of_list TYPE slis_t_listheader,
           gs_layout TYPE slis_layout_alv,
           gt_events      TYPE slis_t_event,
           gs_events      type slis_alv_event,
           gt_print       TYPE slis_print_alv,
           g_top_of_page  TYPE slis_formname VALUE 'TOP_OF_PAGE'.
    Selection Parameters
    SELECTION-SCREEN BEGIN OF BLOCK B1.
    SELECT-OPTIONS : SO_MATNR FOR MARA-MATNR OBLIGATORY.
    SELECT-OPTIONS : SO_WERKS FOR MARC-WERKS.
    SELECT-OPTIONS : SO_SPRAS FOR MAKT-SPRAS.
    SELECT-OPTIONS : SO_BWKEY FOR MBEW-BWKEY.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-001.
    PARAMETERS: p_email TYPE somlreci1-receiver
                                      default '[email protected]'.
    SELECTION-SCREEN END OF BLOCK B2.
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-002.
    PARAMETERS : SO_LAY TYPE DISVARIANT-VARIANT DEFAULT '/DEFAULT'.
    SELECTION-SCREEN END OF BLOCK B3.
    DATA Declarations.
    Data : BEGIN OF ITab OCCURS 0,
           manr type mara-matnr,
           end of ITAB.
    data : BEGIN OF IT_TABLE OCCURS 0,
           MATNR TYPE MARA-MATNR,
           MATKL TYPE MARA-MATKL,
           MEINS TYPE MARA-MEINS,
           MTART TYPE MARA-MTART,
           AHDIS TYPE MARC-AHDIS,
           AUSDT TYPE MARC-AUSDT,
           AUTRU TYPE MARC-AUTRU,
           BESKZ TYPE MARC-BESKZ,
           BSTFE TYPE MARC-BSTFE,
           BSTMA TYPE MARC-BSTMA,
           BSTMI TYPE MARC-BSTMI,
           BSTRF TYPE MARC-BSTRF,
           BWSCL TYPE MARC-BWSCL,
           DIBER TYPE MARC-DIBER,
           DISGR TYPE MARC-DISGR,
           DISLS TYPE MARC-DISLS,
           DISMM TYPE MARC-DISMM,
           DISPO TYPE MARC-DISPO,
           DISPR TYPE MARC-DISPR,
           DZEIT TYPE MARC-DZEIT,
           EISBE TYPE MARC-EISBE,
           EISLO TYPE MARC-EISLO,
           EKGRP TYPE MARC-EKGRP,
           FHORI TYPE MARC-FHORI,
           FXHOR TYPE MARC-FXHOR,
           KAUTB TYPE MARC-KAUTB,
           KORDB TYPE MARC-KORDB,
           KZAUS TYPE MARC-KZAUS,
           LFGJA TYPE MARC-LFGJA,
           LFMON TYPE MARC-LFMON,
           LGRAD TYPE MARC-LGRAD,
           LVORM TYPE MARC-LVORM,
           MABST TYPE MARC-MABST,
           MINBE TYPE MARC-MINBE,
           MMSTA TYPE MARC-MMSTA,
           MMSTD TYPE MARC-MMSTD,
           MRPPP TYPE MARC-MRPPP,
           MTVFP TYPE MARC-MTVFP,
           NFMAT TYPE MARC-NFMAT,
           PERKZ TYPE MARC-PERKZ,
           PLIFZ TYPE MARC-PLIFZ,
           PLVAR TYPE MARC-PLVAR,
           PSTAT TYPE MARC-PSTAT,
           QZGTP TYPE MARC-QZGTP,
           RGEKZ TYPE MARC-RGEKZ,
           RWPRO TYPE MARC-RWPRO,
           SBDKZ TYPE MARC-SBDKZ,
           SCHGT TYPE MARC-SCHGT,
           SHFLG TYPE MARC-SHFLG,
           SHPRO TYPE MARC-SHPRO,
           SHZET TYPE MARC-SHZET,
           SOBSL TYPE MARC-SOBSL,
           STRGR TYPE MARC-STRGR,
           TRAME TYPE MARC-TRAME,
           UEETK TYPE MARC-UEETK,
           UEETO TYPE MARC-UEETO,
           UMLMC TYPE MARC-UMLMC,
           UNETO TYPE MARC-UNETO,
           USEQU TYPE MARC-USEQU,
           VINT1 TYPE MARC-VINT1,
           VINT2 TYPE MARC-VINT2,
           VRBDT TYPE MARC-VRBDT,
           VRBFK TYPE MARC-VRBFK,
           VRBMT TYPE MARC-VRBMT,
           VRBWK TYPE MARC-VRBWK,
           VRMOD TYPE MARC-VRMOD,
           WEBAZ TYPE MARC-WEBAZ,
           WERKS TYPE MARC-WERKS,
           WZEIT TYPE MARC-WZEIT,
          DISKZ TYPE MARD-DISKZ,
          LBSTF TYPE MARD-LBSTF,
          LGORT TYPE MARD-LGORT,
          LMINB TYPE MARD-LMINB,
          LSOBS TYPE MARD-LSOBS,
           MAKTX TYPE MAKT-MAKTX,
           END OF IT_TABLE.
    DATA: BEGIN OF IT_MARD OCCURS 0,
           MATNR TYPE MARA-MATNR,
           MATKL TYPE MARA-MATKL,
           MEINS TYPE MARA-MEINS,
           MTART TYPE MARA-MTART,
           DISKZ TYPE MARD-DISKZ,
           LBSTF TYPE MARD-LBSTF,
           LGORT TYPE MARD-LGORT,
           LMINB TYPE MARD-LMINB,
           LSOBS TYPE MARD-LSOBS,
          MAKTX TYPE MAKT-MAKTX,
           END OF IT_MARD.
    DATA: BEGIN OF IT_MBEW OCCURS 0,
           MATNR TYPE MBEW-MATNR,
           BKLAS TYPE MBEW-BKLAS,
           SALK3 TYPE MBEW-SALK3,
           PEINH TYPE MBEW-PEINH,
           STPRS TYPE MBEW-STPRS,
           VERPR TYPE MBEW-VERPR,
           VPRSV TYPE MBEW-VPRSV,
           END OF IT_MBEW.
    data : BEGIN OF IT_FINAL0 occurs 0,
           MATNR LIKE MARA-MATNR,
           MATKL LIKE MARA-MATKL,
           MEINS LIKE MARA-MEINS,
           MTART LIKE MARA-MTART,
           AHDIS LIKE MARC-AHDIS,
           AUSDT LIKE MARC-AUSDT,
           AUTRU LIKE MARC-AUTRU,
           BESKZ LIKE MARC-BESKZ,
           BSTFE LIKE MARC-BSTFE,
           BSTMA LIKE MARC-BSTMA,
           BSTMI LIKE MARC-BSTMI,
           BSTRF LIKE MARC-BSTRF,
           BWSCL LIKE MARC-BWSCL,
           DIBER LIKE MARC-DIBER,
           DISGR LIKE MARC-DISGR,
           DISLS LIKE MARC-DISLS,
           DISMM LIKE MARC-DISMM,
           DISPO LIKE MARC-DISPO,
           DISPR LIKE MARC-DISPR,
           DZEIT LIKE MARC-DZEIT,
           EISBE LIKE MARC-EISBE,
           EISLO LIKE MARC-EISLO,
           EKGRP LIKE MARC-EKGRP,
           FHORI LIKE MARC-FHORI,
           FXHOR LIKE MARC-FXHOR,
           KAUTB LIKE MARC-KAUTB,
           KORDB LIKE MARC-KORDB,
           KZAUS LIKE MARC-KZAUS,
           LFGJA LIKE MARC-LFGJA,
           LFMON LIKE MARC-LFMON,
           LGRAD LIKE MARC-LGRAD,
           LVORM LIKE MARC-LVORM,
           MABST LIKE MARC-MABST,
           MINBE LIKE MARC-MINBE,
           MMSTA LIKE MARC-MMSTA,
           MMSTD LIKE MARC-MMSTD,
           MRPPP LIKE MARC-MRPPP,
           MTVFP LIKE MARC-MTVFP,
           NFMAT LIKE MARC-NFMAT,
           PERKZ LIKE MARC-PERKZ,
           PLIFZ LIKE MARC-PLIFZ,
           PLVAR LIKE MARC-PLVAR,
           PSTAT LIKE MARC-PSTAT,
           QZGTP LIKE MARC-QZGTP,
           RGEKZ LIKE MARC-RGEKZ,
           RWPRO LIKE MARC-RWPRO,
           SBDKZ LIKE MARC-SBDKZ,
           SCHGT LIKE MARC-SCHGT,
           SHFLG LIKE MARC-SHFLG,
           SHPRO LIKE MARC-SHPRO,
           SHZET LIKE MARC-SHZET,
           SOBSL LIKE MARC-SOBSL,
           STRGR LIKE MARC-STRGR,
           TRAME LIKE MARC-TRAME,
           UEETK LIKE MARC-UEETK,
           UEETO LIKE MARC-UEETO,
           UMLMC LIKE MARC-UMLMC,
           UNETO LIKE MARC-UNETO,
           USEQU LIKE MARC-USEQU,
           VINT1 LIKE MARC-VINT1,
           VINT2 LIKE MARC-VINT2,
           VRBDT LIKE MARC-VRBDT,
           VRBFK LIKE MARC-VRBFK,
           VRBMT LIKE MARC-VRBMT,
           VRBWK LIKE MARC-VRBWK,
           VRMOD LIKE MARC-VRMOD,
           WEBAZ LIKE MARC-WEBAZ,
           WERKS LIKE MARC-WERKS,
           WZEIT LIKE MARC-WZEIT,
           DISKZ LIKE MARD-DISKZ,
           LBSTF LIKE MARD-LBSTF,
           LGORT LIKE MARD-LGORT,
           LMINB LIKE MARD-LMINB,
           LSOBS LIKE MARD-LSOBS,
           MAKTX LIKE MAKT-MAKTX,
           END OF IT_FINAL0.
    data : BEGIN OF IT_FINAL occurs 0,
           MATNR LIKE MARA-MATNR,
           MATKL LIKE MARA-MATKL,
           MEINS LIKE MARA-MEINS,
           MTART LIKE MARA-MTART,
           AHDIS LIKE MARC-AHDIS,
           AUSDT LIKE MARC-AUSDT,
           AUTRU LIKE MARC-AUTRU,
           BESKZ LIKE MARC-BESKZ,
           BSTFE LIKE MARC-BSTFE,
           BSTMA LIKE MARC-BSTMA,
           BSTMI LIKE MARC-BSTMI,
           BSTRF LIKE MARC-BSTRF,
           BWSCL LIKE MARC-BWSCL,
           DIBER LIKE MARC-DIBER,
           DISGR LIKE MARC-DISGR,
           DISLS LIKE MARC-DISLS,
           DISMM LIKE MARC-DISMM,
           DISPO LIKE MARC-DISPO,
           DISPR LIKE MARC-DISPR,
           DZEIT LIKE MARC-DZEIT,
           EISBE LIKE MARC-EISBE,
           EISLO LIKE MARC-EISLO,
           EKGRP LIKE MARC-EKGRP,
           FHORI LIKE MARC-FHORI,
           FXHOR LIKE MARC-FXHOR,
           KAUTB LIKE MARC-KAUTB,
           KORDB LIKE MARC-KORDB,
           KZAUS LIKE MARC-KZAUS,
           LFGJA LIKE MARC-LFGJA,
           LFMON LIKE MARC-LFMON,
           LGRAD LIKE MARC-LGRAD,
           LVORM LIKE MARC-LVORM,
           MABST LIKE MARC-MABST,
           MINBE LIKE MARC-MINBE,
           MMSTA LIKE MARC-MMSTA,
           MMSTD LIKE MARC-MMSTD,
           MRPPP LIKE MARC-MRPPP,
           MTVFP LIKE MARC-MTVFP,
           NFMAT LIKE MARC-NFMAT,
           PERKZ LIKE MARC-PERKZ,
           PLIFZ LIKE MARC-PLIFZ,
           PLVAR LIKE MARC-PLVAR,
           PSTAT LIKE MARC-PSTAT,
           QZGTP LIKE MARC-QZGTP,
           RGEKZ LIKE MARC-RGEKZ,
           RWPRO LIKE MARC-RWPRO,
           SBDKZ LIKE MARC-SBDKZ,
           SCHGT LIKE MARC-SCHGT,
           SHFLG LIKE MARC-SHFLG,
           SHPRO LIKE MARC-SHPRO,
           SHZET LIKE MARC-SHZET,
           SOBSL LIKE MARC-SOBSL,
           STRGR LIKE MARC-STRGR,
           TRAME LIKE MARC-TRAME,
           UEETK LIKE MARC-UEETK,
           UEETO LIKE MARC-UEETO,
           UMLMC LIKE MARC-UMLMC,
           UNETO LIKE MARC-UNETO,
           USEQU LIKE MARC-USEQU,
           VINT1 LIKE MARC-VINT1,
           VINT2 LIKE MARC-VINT2,
           VRBDT LIKE MARC-VRBDT,
           VRBFK LIKE MARC-VRBFK,
           VRBMT LIKE MARC-VRBMT,
           VRBWK LIKE MARC-VRBWK,
           VRMOD LIKE MARC-VRMOD,
           WEBAZ LIKE MARC-WEBAZ,
           WERKS LIKE MARC-WERKS,
           WZEIT LIKE MARC-WZEIT,
           DISKZ LIKE MARD-DISKZ,
           LBSTF LIKE MARD-LBSTF,
           LGORT LIKE MARD-LGORT,
           LMINB LIKE MARD-LMINB,
           LSOBS LIKE MARD-LSOBS,
           MAKTX LIKE MAKT-MAKTX,
           BKLAS LIKE MBEW-BKLAS,
           SALK3 LIKE MBEW-SALK3,
           PEINH LIKE MBEW-PEINH,
           STPRS LIKE MBEW-STPRS,
           VERPR LIKE MBEW-VERPR,
           VPRSV LIKE MBEW-VPRSV,
           ZXPRS LIKE MBEW-STPRS,
           END OF IT_FINAL.
    data : BEGIN OF IT_display occurs 0,
           matnr LIKE MARA-MATNR,
           maktx LIKE MAKT-MAKTX,
           meins LIKE MARA-MEINS,
           werks LIKE MARC-WERKS,
           dispo LIKE MARC-DISPO,
           dismm LIKE MARC-DISMM,
           plifz LIKE MARC-PLIFZ,
           webaz LIKE MARC-WEBAZ,
           minbe LIKE MARC-MINBE,
         shzet LIKE MARC-SHZET,
         eisbe LIKE MARC-EISBE,
         disls LIKE MARC-DISLS,
         bstmi LIKE MARC-BSTMI,
         bstma LIKE MARC-BSTMA,
         bstfe LIKE MARC-BSTFE,
         ZXPRS LIKE MBEW-STPRS,
         peinh LIKE MBEW-PEINH,
         salk3 LIKE MBEW-SALK3,
           end of it_display.
    ALV Layout Variant
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_lay.
      PERFORM get_alv_layout_values.
    SELECTION SCREEN.
    AT SELECTION-SCREEN.
      IF ( sscrfields-ucomm = 'SJOB' OR
      sy-batch = 'X' ).
        s_job = 'X'.
      ENDIF.
    select single matnr into itab from mara where matnr in so_matnr.
    if sy-subrc <> 0.
    message e001(zpal).
    endif.
    START-OF-SELECTION.
      IF SO_LAY <> ' '.
        VARIANT-REPORT = 'ZPMACR01_MD_MRP_100'.
        VARIANT-VARIANT = SO_LAY.
    else.
    VARIANT-VARIANT = '/DEFAULT'.
      ENDIF.
    INITIALIZATION.
      W_REPID = SY-REPID.
    START-OF-SELECTION.
    IF SO_LAY <> ' '.
        VARIANT-REPORT  = w_repid.
        VARIANT-VARIANT = SO_LAY.
    else.
    VARIANT-VARIANT = '/DEFAULT'.
    ENDIF.
      SELECT
      MARA~MATNR
      MARA~MATKL
      MARA~MEINS
      MARA~MTART
      MARC~AHDIS
      MARC~AUSDT
      MARC~AUTRU
      MARC~BESKZ
      MARC~BSTFE
      MARC~BSTMA
      MARC~BSTMI
      MARC~BSTRF
      MARC~BWSCL
      MARC~DIBER
      MARC~DISGR
      MARC~DISLS
      MARC~DISMM
      MARC~DISPO
      MARC~DISPR
      MARC~DZEIT
      MARC~EISBE
      MARC~EISLO
      MARC~EKGRP
      MARC~FHORI
      MARC~FXHOR
      MARC~KAUTB
      MARC~KORDB
      MARC~KZAUS
      MARC~LFGJA
      MARC~LFMON
      MARC~LGRAD
      MARC~LVORM
      MARC~MABST
      MARC~MINBE
      MARC~MMSTA
      MARC~MMSTD
      MARC~MRPPP
      MARC~MTVFP
      MARC~NFMAT
      MARC~PERKZ
      MARC~PLIFZ
      MARC~PLVAR
      MARC~PSTAT
      MARC~QZGTP
      MARC~RGEKZ
      MARC~RWPRO
      MARC~SBDKZ
      MARC~SCHGT
      MARC~SHFLG
      MARC~SHPRO
      MARC~SHZET
      MARC~SOBSL
      MARC~STRGR
      MARC~TRAME
      MARC~UEETK
      MARC~UEETO
      MARC~UMLMC
      MARC~UNETO
      MARC~USEQU
      MARC~VINT1
      MARC~VINT2
      MARC~VRBDT
      MARC~VRBFK
      MARC~VRBMT
      MARC~VRBWK
      MARC~VRMOD
      MARC~WEBAZ
      MARC~WERKS
      MARC~WZEIT
    MARD~DISKZ
    MARD~LBSTF
    MARD~LGORT
    MARD~LMINB
    MARD~LSOBS
      MAKT~MAKTX
    INTO TABLE IT_TABLE
    FROM MARA INNER JOIN MARC ON MARAMATNR = MARCMATNR
    INNER JOIN MAKT ON MARAMATNR = MAKTMATNR
    WHERE MARA~MATNR IN SO_MATNR
           AND MARC~WERKS IN SO_WERKS
           AND MAKT~SPRAS IN SO_SPRAS.
      SELECT
      MARA~MATNR
      MARA~MATKL
      MARA~MEINS
      MARA~MTART
      MARD~DISKZ
      MARD~LBSTF
      MARD~LGORT
      MARD~LMINB
      MARD~LSOBS
      INTO TABLE IT_mard
       FROM MARA INNER JOIN MARD ON MARAMATNR = MARDMATNR
                WHERE  MARA~MATNR IN SO_MATNR
                      and mard~werks in SO_WERKS.
      SELECT MATNR BKLAS SALK3 PEINH STPRS VERPR VPRSV
      INTO TABLE IT_MBEW FROM MBEW FOR ALL ENTRIES IN IT_TABLE WHERE MATNR =
      IT_TABLE-MATNR AND BWKEY IN SO_BWKEY.
      LOOP AT IT_TABLE.
       MOVE-CORRESPONDING IT_TABLE TO IT_FINAL0.
        READ TABLE IT_MARD WITH KEY MATNR = IT_TABLE-MATNR.
        IF SY-SUBRC = 0 .
         MOVE-CORRESPONDING IT_MARD TO IT_FINAL0.
        ENDIF.
         APPEND IT_FINAL0.
         CLEAR IT_FINAL0.
      ENDLOOP.
    LOOP AT IT_FINAL0.
        READ TABLE IT_MBEW WITH KEY MATNR = IT_final0-MATNR.
        IF SY-SUBRC = 0 .
         MOVE-CORRESPONDING IT_MBEW TO IT_FINAL.
         IF IT_MBEW-VPRSV = 'S'.
          MOVE IT_MBEW-STPRS TO IT_FINAL-ZXPRS.
         ELSE.
          MOVE IT_MBEW-VERPR TO IT_FINAL-ZXPRS.
         ENDIF.
        ENDIF.
        MOVE-CORRESPONDING IT_FINAL0 TO IT_FINAL.
        APPEND IT_FINAL.
        CLEAR IT_FINAL.
    ENDLOOP.
    Default Layout
      LOOP AT IT_FINAL.
        Read table it_final with key matnr = SO_matnr.
        Move it_final-MATNR to it_display-MATNR.
        Move it_final-MAKTX to it_display-MAKTX.
        Move it_final-MEINS to it_display-MEINS.
        Move it_final-WERKS to it_display-WERKS.
        Move it_final-DISPO to it_display-DISPO.
        Move it_final-DISMM to it_display-DISMM.
        Move it_final-PLIFZ to it_display-PLIFZ.
        Move it_final-WEBAZ to it_display-WEBAZ.
        Move it_final-MINBE to it_display-MINBE.
        Move it_final-SHZET to it_display-SHZET.
        Move it_final-EISBE to it_display-EISBE.
        Move it_final-DISLS to it_display-DISLS.
        Move it_final-BSTMI to it_display-BSTMI.
        Move it_final-BSTMA to it_display-BSTMA.
        Move it_final-BSTFE to it_display-BSTFE.
        MOVE it_final-ZXPRS to it_display-ZXPRS.
        Move it_final-PEINH to it_display-PEINH.
        Move it_final-SALK3 to it_display-SALK3.
        Append it_display.
      endloop.
      data: v_data type c value ' '.
      if it_display is initial.
        v_data = ' '.
      else.
        v_data = 'X'.
      endif.
    END-OF-SELECTION.
    END-OF-SELECTION.
      if s_job = 'X'.
        perform execute_back.
      else.
        perform execute_fore.
      endif.
          FORM execute_fore                                             *
    Form execute_fore.
    *&      Form REUSE_ALV_FIELDCATALOG_MERGE
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         I_PROGRAM_NAME               = W_REPID
         I_INTERNAL_TABNAME           = 'IT_FINAL'
      I_STRUCTURE_NAME             =
      I_CLIENT_NEVER_DISPLAY       = 'X'
         I_INCLNAME                   = W_REPID
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
        CHANGING
          CT_FIELDCAT                  = IT_FIELDCAT
       EXCEPTIONS
         INCONSISTENT_INTERFACE       = 1
         PROGRAM_ERROR                = 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.
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    *IF SO_LAY <> ' '.
    VARIANT-VARIANT = SO_LAY.
    *endif.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
                       I_INTERFACE_CHECK                 = ' '
                       I_BYPASSING_BUFFER                =
                       I_BUFFER_ACTIVE                   = ' '
                         I_CALLBACK_PROGRAM                = W_REPID
                       I_CALLBACK_PF_STATUS_SET          = ' '
                       I_CALLBACK_USER_COMMAND           = ' '
                       I_CALLBACK_TOP_OF_PAGE            = ' '
                       I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
                       I_CALLBACK_HTML_END_OF_LIST       = ' '
                       I_STRUCTURE_NAME                  =
                       I_BACKGROUND_ID                   = ' '
                       I_GRID_TITLE                      =
                       I_GRID_SETTINGS                   =
                       IS_LAYOUT                         = IT_LAYOUT
                         IT_FIELDCAT                       = IT_FIELDCAT[]
                       IT_EXCLUDING                      =
                       IT_SPECIAL_GROUPS                 =
                       IT_SORT                           =
                       IT_FILTER                         =
                       IS_SEL_HIDE                       =
                       I_DEFAULT                         = 'X'
                         I_SAVE                            = 'X'
                         IS_VARIANT                        = VARIANT
                       IT_EVENTS                         =
                       IT_EVENT_EXIT                     =
                       IS_PRINT                          =
                       IS_REPREP_ID                      =
                       I_SCREEN_START_COLUMN             = 0
                       I_SCREEN_START_LINE               = 0
                       I_SCREEN_END_COLUMN               = 0
                       I_SCREEN_END_LINE                 = 0
                       IT_ALV_GRAPHICS                   =
                       IT_ADD_FIELDCAT                   =
                       IT_HYPERLINK                      =
                       I_HTML_HEIGHT_TOP                 =
                       I_HTML_HEIGHT_END                 =
                       IT_EXCEPT_QINFO                   =
                     IMPORTING
                       E_EXIT_CAUSED_BY_CALLER           =
                       ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = IT_FINAL
       EXCEPTIONS
         PROGRAM_ERROR                     = 1
         OTHERS                            = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endform.
          FORM execute_back                                             *
    FORM execute_back.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         I_PROGRAM_NAME               = W_REPID
         I_INTERNAL_TABNAME           = 'IT_FINAL'
      I_STRUCTURE_NAME             =
      I_CLIENT_NEVER_DISPLAY       = 'X'
         I_INCLNAME                   = W_REPID
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
        CHANGING
          CT_FIELDCAT                  = IT_FIELDCAT
       EXCEPTIONS
         INCONSISTENT_INTERFACE       = 1
         PROGRAM_ERROR                = 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 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
         I_CALLBACK_PROGRAM                = W_REPID
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
         I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
       IS_LAYOUT                         =
         IT_FIELDCAT                       = it_fieldcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
         I_SAVE                            = 'X'
         IS_VARIANT                        = variant
        IT_EVENTS                         = gt_events[]
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = it_final
    EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2
    *IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    endform.
    form top_of_page.
    CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_GET'
       IMPORTING
        ES_LAYOUT                 =
         ET_FIELDCAT               = IT_FIELDCAT3[]
        ET_SORT                   =
        ET_FILTER                 =
        ES_GRID_SCROLL            =
         ES_VARIANT                = VARIANT
        ET_MARKED_COLUMNS         =
        ET_FILTERED_ENTRIES       =
        ET_FIELDCAT_BACKEND       =
        ES_PRINT                  =
       EXCEPTIONS
         NO_INFOS                  = 1
         PROGRAM_ERROR             = 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.
    clear count.
    LOOP AT IT_FIELDCAT3 into is_fieldcat3 where no_out eq space.
    *move-corresponding is_fieldcat3 to is_fieldcat2.
    move: is_fieldcat3-fieldname to is_fieldcat2-fieldname,
          is_fieldcat3-ref_fieldname to is_fieldcat2-ref_field,
          is_fieldcat3-ref_tabname to is_fieldcat2-ref_table,
          is_fieldcat3-seltext_l to is_fieldcat2-coltext,
          is_fieldcat3-no_out to is_fieldcat2-no_out,
          is_fieldcat3-col_pos to is_fieldcat2-col_pos.
    *move:
         is_fieldcat3-row_pos to is_fieldcat2-row_pos,
         is_fieldcat3-col_pos to is_fieldcat2-col_pos,
         is_fieldcat3-fieldname to is_fieldcat2-fieldname,
         is_fieldcat3-tabname   to is_fieldcat2-tabname,
         is_fieldcat3-outputlen to is_fieldcat2-outputlen,
         is_fieldcat3-no_out    to is_fieldcat2-no_out,
         is_fieldcat3-seltext_l to is_fieldcat2-coltext,
         is_fieldcat3-ref_fieldname to is_fieldcat2-ref_field,
         is_fieldcat3-ref_tabname to is_fieldcat2-ref_table,
         is_fieldcat3-DDIC_OUTPUTLEN to is_fieldcat2-DD_OUTLEN,
         is_fieldcat3-datatype to is_fieldcat2-datatype,
         is_fieldcat3-inttype to is_fieldcat2-inttype,
         is_fieldcat3-INTLEN to is_fieldcat2-INTLEN.
    APPEND IS_FIELDCAT2 TO IT_FIELDCAT2.
    *count = count + 1.
    ENDLOOP.
    loop at it_fieldcat2 into is_fieldcat2.
      if is_fieldcat2-no_out = 'X'.
       delete it_fieldcat2 index sy-tabix.
      else.
       count = count + 1.
      endif.
    endloop.
    describe table it_fieldcat2 lines count.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = it_fieldcat2[]
        IMPORTING
          ep_table        = new_table.
      ASSIGN new_table->* TO <tab>.
      CREATE DATA new_line LIKE LINE OF <tab>.
      ASSIGN new_line->* TO <wa>.
    *-- Perform to build table for attachment data
      PERFORM build_xls_data_table.
    *-- Perform to populate  e-mail message
      PERFORM populate_email_message_body.
    *-- Perform to send mail
      PERFORM send_file_as_email_attachment.
    *-- Perform to Instruct mail send program for SAPCONNECT to send email.
      PERFORM initiate_mail_execute_program.
    ENDFORM.
    *&      Form  build_xls_data_table
    form build_xls_data_table.
      data: char_var(30) type C,
            num_var(10) type n.
      CONSTANTS: con_cret TYPE x VALUE '0D',  "NEW LINE
                  tabchar TYPE x VALUE '09'.   "tab
      loop at it_fieldcat2 into is_fieldcat2.
        concatenate it_attach is_fieldcat2-coltext
        into it_attach separated by tabchar.
      endloop.
      CONCATENATE con_cret it_attach  INTO it_attach.
      APPEND  it_attach.
      CLEAR it_attach.
       field-symbols: <t> type ANY.
      LOOP AT it_final.
      col_1 = 1.
       do count times.
       Assign component col_1 of structure <wa> to <f>.
       read table it_fieldcat2 into is_fieldcat2 with key col_pos = col_1.
       loop at it_fieldcat into is_fieldcat.
       if is_fieldcat-fieldname = is_fieldcat2-fieldname.
        assign component is_fieldcat-col_pos of structure it_final to <t>.
        exit.
       endif.
       endloop.
       <f> = <t>.
       clear <t>.
       col_1 = col_1 + 1.
       enddo.
       append <wa> to <tab>.
       endloop.
      loop at <tab> into <wa>.
      col_1 = 1.
      do count times.
       Assign component col_1 of structure <wa> to <f>.
       move <f> to char_var.
       concatenate it_attach char_var
       into it_attach separated by tabchar.
       col_1 = col_1 + 1.
      enddo.
       CONCATENATE con_cret it_attach INTO it_attach.
       APPEND it_attach.
       CLEAR it_attach.
      endloop.
    ENDFORM.
    FORM send_file_as_email_attachment.
      DATA:
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ.
      ld_email = p_email.
      ld_mtitle = text-003.
      ld_format = 'XLS'.
      ld_attdescription  = ' '.
      ld_attfilename = 'DATA'.
      ld_sender_address = ' '.
      ld_sender_address_type = ' '.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
    ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      LOOP AT it_attach.
        MOVE it_attach(255) TO t_hex.
        APPEND t_hex.
        MOVE it_attach+255(255) TO t_hex.
        APPEND t_hex.
        MOVE it_attach+510(255) TO t_hex.
        APPEND t_hex.
        MOVE it_attach+765(235) TO t_hex.
        APPEND t_hex.
        MOVE it_attach+765(255) TO t_hex.
        APPEND t_hex.
        MOVE it_attach+1020(255) TO t_hex.
        APPEND t_hex.
        MOVE it_attach+1275(255) TO t_hex.
        APPEND t_hex.
        MOVE it_attach+1530(255) TO t_hex.
        APPEND t_hex.
        MOVE it_attach+1785(255) TO t_hex.
        APPEND t_hex.
        MOVE it_attach+2040(255) TO t_hex.
        APPEND t_hex.
        MOVE it_attach+2295(255) TO t_hex.
        APPEND t_hex.
        MOVE it_attach+2550(100) TO t_hex.
        APPEND t_hex.
      ENDLOOP.
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_hex LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data       = w_doc_data
                put_in_outbox       = 'X'
                sender_address      = ld_sender_address
                sender_address_type = ld_sender_address_type
          IMPORTING
               sent_to_all         = w_sent_all
           TABLES
                packing_list        = t_packing_list
                contents_txt        = it_message
                contents_hex        = t_hex
                receivers           = t_receivers
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ld_error = sy-subrc.
    LOOP AT t_receivers.
       ld_receiver = t_receivers-retrn_code.
    ENDLOOP.
    ENDFORM. "SEND_FILE_AS_EMAIL_ATTACHMENT
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
          Instructs mail send program for SAPCONNECT to send email.
    FORM initiate_mail_execute_program.
      WAIT UP TO 2 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT'
                    WITH output = 'X'
                    AND RETURN.
    ENDFORM.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    *&      Form  POPULATE_EMAIL_MESSAGE_BODY
           Populate message body text
    FORM populate_email_message_body.
      REFRESH it_message.
      it_message = text-004.
      APPEND  it_message.
      CONCATENATE SY-DATUM 'to' SY-DATUM INTO it_message SEPARATED BY
      space.
      APPEND  it_message.
    ENDFORM.                    " POPULATE_EMAIL_MESSAGE_BODY
    *&      Form  get_alv_layout_values
    FORM get_alv_layout_values.
      variant-report = w_repid.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
           EXPORTING
                is_variant    = variant
                i_save        = 'A'
           IMPORTING
                es_variant    = variant
           EXCEPTIONS
                not_found     = 1
                program_error = 2
                OTHERS        = 3.
      CHECK sy-subrc = 0.
      so_lay = variant-variant.
    ENDFORM.                    " get_alv_layout_values

    Hi Arpit,
    Take a look at the documentation of FM 'SO_DOCUMENT_SEND_API1' for parameter PACKING_LIST. I think you should set t_packing_list-head_num to a different value than 0 for the second attachment.
    Regards,
    John.

  • Spool list column width

    Hi,
    when i am running ALV in background i see in the spool list there is one column 'sales document' in which the last digit is not appearing. If the required number is 12345678, it is appearing it as 1234567..

    Hello Raj,
    When you execute the report in backgroud, the output is classical report and which need the line size. If not defined in report then the default is taken as 80 chars.
    Please check the line size defined in your program, if not pls define.
    REPORT <report> LINE-SIZE <width> LINE-COUNT <height> NO STANDARD PAGE HEADING.
    If the line size is more than 255 chars, then there is OSS note for it. (you can try note 530147)
    Hope this helps you.
    Regards,
    Sachinkumar Mehta

  • Problem: Adapter SOAP

    Hello.
    My problem is recepcionar a SOAP external errors produced. The idea is that XI / IP register those errors and surrendered to a proxy SAP ECC.
    SOAP you want to capture.
    <Soap: Envelope xmlns: soap = "http://schemas.xmlsoap.org/soap/envelope/" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns: xsd = " http://www.w3.org/2001/XMLSchema ">
        <soap:Body>
           <soap:Fault>
              <faultcode> Soap: Server </ faultcode>
              <faultstring> Error for data decimal  </ faultstring>
              Transactions <faultactor> </ faultactor>
              <detail>
                 It was not possible to make <message> Transaction Order Income </ message>
                 <description> Problems in accessing the repository </ description>
              </ Detail>
           </ Soap: Fault>
        </ Soap: Body>
    </ Soap: Envelope>
    The flow is:
    (1) SAP ECC (Proxy) <-> (2) SAP XI / IP Mapping <-> (3) External WebService

    Hello.
    My design is next.
    IN SAP XI/PI
    - Interface Object
    1.- Create Fault Message Types. (MT_FAULT)
    2.- Message Interfaces / add Fault Message Types (MT_FAULT) (Add Proxy and SOAP interfaces)
    - Mapping Object
    3.- Message Mapping / Add Mapping (MT_FAULT mapping MT_FAULT)   -> (MM_FAULT = mapping generate)
    4.- Interfaces Mapping / Method Request,Response and Fault.
                In Method Fault add (MM_FAULT).
    IN SPROXY SAP ECC
    5.- Execute transacction Sproxy and regenerate namespaces of interface.
    6.- Debug interface and NOT MESSAGE ERROR.
    But entry transaction SXI_MONITOR, in SAP ECC the XML is next.
    (SOAP HEADER - ERROR)
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Inbound Message
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="PARSING">ADAPTER.SOAP_EXCEPTION</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>soap fault: Server was unable to read request. ---> There is an error in XML document (1, 526). ---> Instance validation error: 'CL' is not a valid value for SolicitudOrdenPagoMonedaOperacion.</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>

  • KE28 - Selection Criteria and Processing

    Hello Expert,
    we  will need, when we are executing transacction ke28 that  it runs  this process  excluding some products or
    this does not consider some records
    I review some recomendations but I dont found one solution.
    1.   http://scn.sap.com/thread/607526
    2.   http://scn.sap.com/thread/1887453
    3.   http://scn.sap.com/thread/1707542
    4.   Example: Selection Criteria and Processing Instructions - Profitability Analysis (COPA) - SAP Library
    5.   77476 - Information: top-down planning
    6.   1928710 - KE28 enhancements (this note oss not apply in SAP ECC 6.0)
    7.   1933479 - KE28: Enhancements (this note oss not apply in SAP ECC 6.0)
    I try explain:
    Actual data:
    From period 001.2014
    Record type 1.
    Reference data
    From period 001.2014
    Version
    Record type Z, B.
    1.     Top-Down Distribution:Processing Instruccions
    Int this point it cant use options (DLvl and Sum) when it use range because:
    This processing rule is not allowed for the characteristic
    Procedure
    Select either "Retain" or "Copy to" for characteristics for which you have specified characteristic values.
    For characteristic that you want to summarize or distribute ("Summarize" or "Distribution level" button), you must enter an asterisk (*) on the "Selection Criteria" screen.
    => In this case, it use optios CPY.
    2.     Selection Criteria (Characteristic)
             => In this case here, it consider characteristic values and excluding values.
    Finally:   it not get good result because it not distribute.!!
    Then, ¿is it possible excluding records from derivation rule?
    ¿is there any exit in COPA for ke28?
    For example ¿is it possible excluding  records from  exit COPA0001 ?
    All your recomendations w ill be w elcome.
    Many thanks for your support and recomendations.
    Best regards,

    Dear Sap Expert,
    All your recomendations will be welcome.
    I try  explain the following scenary:
    This is actual data real (Record type Z, B from COPA)  and it has only version 0. 
    Not plan and  it does not use planning layouts or reports.
    Example:
    Client
    Material
    Product
    Sub Line
    C1
    M1
    P1
    L1
    C2
    M1
    P1
    L1
    C3
    M3
    P2
    L2
    C4
    M4
    P3
    L3
    C5
    M5
    P4
    L4 (Excluding this records or Line)
    C5
    M6
    P5
    L4 (Excluding this records or Line)
    The following entries are made on the screen 'Selection criteria':
    Characteristic       Characteristic value
    Society CO                      *
    Material                            *
    Product                            *
    Client                                *
    Sub líneas                     L1,L2,L3
    The following entries are made on the screen 'Processing rules':
    Characteristic
    Distribution level
    Transfer
    Summarize
    Society CO
    X
    Material
    X
    Product
    X
    Client
    X
    Sub líneas
    X
    When we run trasacction ke28 then  the result is not good because it does not distribute nothing.
    But
    when we change “selection criteria”
    Characteristic      characteristic value:
    Sub línea                *
    The result is ok and distribute!
    ¿How does we  exclude some records?
    Could you explain better this distribution using only transaction ke28, please? or Could you give me other note oss about distribution KE28, please?
    Many thanks for your support and recomendations.
    Best regards,
    a

  • Fault Message SOAP

    Hello.
    My design is next.
    IN SAP XI/PI
    Interface Object
    1.- Create Fault Message Types. (MT_FAULT)
    2.- Message Interfaces / add Fault Message Types (MT_FAULT) (Add Proxy and SOAP interfaces)
    Mapping Object
    3.- Message Mapping / Add Mapping (MT_FAULT mapping MT_FAULT) -> (MM_FAULT = mapping generate)
    4.- Interfaces Mapping / Method Request,Response and Fault.
    In Method Fault add (MM_FAULT).
    IN SPROXY SAP ECC
    5.- Execute transacction Sproxy and regenerate namespaces of interface.
    6.- Debug interface and NOT MESSAGE ERROR.
    But entry transaction SXI_MONITOR, in SAP ECC the XML is next.
    (SOAP HEADER - ERROR)
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <!-- Inbound Message
    -->
    <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
    <SAP:Category>XIAdapter</SAP:Category>
    <SAP:Code area="PARSING">ADAPTER.SOAP_EXCEPTION</SAP:Code>
    <SAP:P1 />
    <SAP:P2 />
    <SAP:P3 />
    <SAP:P4 />
    <SAP:AdditionalText>soap fault: Server was unable to read request. ---> There is an error in XML document (1, 526). ---> Instance validation error: 'CL' is not a valid value for SolicitudOrdenPagoMonedaOperacion.</SAP:AdditionalText>
    <SAP:ApplicationFaultMessage namespace="" />
    <SAP:Stack />
    <SAP:Retry>M</SAP:Retry>
    </SAP:Error>
    bold The error "AdditionalText" want add in table Z.

    Hello.
    It happens that I have created all this and do not know how to obtain the values of error.
    The only mistake I have used SXI_MONITOR.
    But I need to take the error message and send to a table Z. The idea is that in the Proxy My SAP ECC returns an exception with the error.
    So far not done.

  • Improving performance for SM35

    Hi all,
    Are there any ways to improve the performance (time taken to load data) of SM35?
    We are aware of executing the session in backgroud, but due to high data volume (~>10,000 records) per file, the time taken is still slow (about 3 hours per file).

    Hi Raj,
    The previous posters gave already all the information you need, but since the question is still open, let me try to summarize it.
    You're getting almost 1 transaction processed per second, which might be ok depending on the application area and the complexity of the executed transaction. So as Hermann initially pointed out, you should first profile the transaction you're running and check for any inefficiencies (custom coding in exits/BAdI's are often sources of slow-downs). If you find any problems, tune your transaction/application (not SM35).
    If your application is fast enough (i.e. you cannot find any easy measures for making your transaction faster), you can compare application/transaction processing time versus total time taken in SM35. I personally doubt that you'll find any worthwhile discrepancy there (i.e. process time taken up by SM35, which is not due to the called transaction). Thus you should be left with Hermann's initial point of running several BDC's in parallel - meaning that you'll have to split your input file (you can automate that if you have to run such loads regularly). Without parallel processing you will always encounter unacceptable processing times when running huge data loads (even with optimal coding throughout the application).
    Kind regards, harald

  • In House Cash account balance did not reduce after executing F111

    Hi,
    This is regarding external payment via IHC.
    Subsidiary 3000 with IHC account 3000010 is paying Vendor A.
    3000 execute F110 payment run and AP open item is cleared.
    Payment order is generated and posted. Payment request is created.
    IHC 3000010 account balance decrease by the payment amount.
    IHC 1000010 account balance increase by the payemnt amount.
    Company code 1000 with IHC account 1000010 execute F111 to pay the external payment.
    After payment request is executed. Balance in 100010 does not decrease.
    Why is it so?
    I dont think this is correct. Appreciate your response and assistance.
    Cheers.

    Hi,
    This is regarding external payment via IHC.
    Subsidiary 3000 with IHC account 3000010 is paying Vendor A.
    3000 execute F110 payment run and AP open item is cleared.
    Payment order is generated and posted. Payment request is created.
    IHC 3000010 account balance decrease by the payment amount.
    IHC 1000010 account balance increase by the payemnt amount.
    Company code 1000 with IHC account 1000010 execute F111 to pay the external payment.
    After payment request is executed. Balance in 100010 does not decrease.
    Why is it so?
    I dont think this is correct. Appreciate your response and assistance.
    Cheers.

  • How to save a file locally when executing backgroud job??

    Hi guys!
    Hope you can help...
    I need to be able to save a file (text file) locally on my machine when Im running my report in the background...
    Basically my program works like this:
    I have a Selection Screen where the user makes a selection, and enters where on his/her local machine a generated text file (.txt) needs to be saved when F8 has been pressed.
    But, it should ALSO be possible for this generated text file to be saved to the same location on the local machine if the program is run as a background job...
    Is that possible??  or can one only save stuff when you run things in the background on the Application Side??  Do I have to use "OPEN DATASET" keywords, or is there a Function Module you know of??
    POINTS WILL BE REMOVED!!!
    tks
    Christiaan
    Edited by: Julius Bussche on Jul 11, 2008 8:34 PM

    Hello,
    It is not possible to save file locally when running the program in background. It will be only saved on the application server.
    We had a similar requirement earlier. We developed another program which is executed after this program which downloads the file from the application server to the user desktop. This is just one simple additional step which should solve your problem.
    Hope this helps.
    cheers,
    Sushil Josih

  • Backgroud Job with spool list recipient

    I want to execute a report (smartform) in backgroud ( specific the recipient determination with "[email protected]" ) and want to send the PDF format of the report layout to the email address which I input in recipient .
    I did a test  and reveived the mail with PDF attach file .but the PDF is blank ...what happen?
    The report is correct and has values  when executed frontend.

    Hi santosh p 
    I try to download the file with pdf format.
    the resulte is the pdf file is empty....
    I don't know why?
        TH_PRINT-XSFCMODE  = 'X'.
        TH_PRINT-XSF       = space.
        TH_PRINT-XDFCMODE  = 'X'.
        TH_PRINT-XDF       = space.
        TH_PRINT-TDPRINTER = O_SPLD.
        TH_CONTROL-NO_DIALOG = CNS_X.
        IF P_RADIO1 = CNS_X.
          TH_CONTROL-PREVIEW   = CNS_X.             " Preview
        ELSEIF P_RADIO2 = CNS_X.
          TH_CONTROL-PREVIEW   = SPACE.             " WITHOUT PREVIEW
        ENDIF.
        TH_CONTROL-GETOTF = 'X'.
    ----- Get the function name from the name of smartform
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
             EXPORTING
                  FORMNAME           = CNS_SFORM           "Smartform Name
             IMPORTING
                  FM_NAME            = LW_FUNC_NAME        "Function Name
             EXCEPTIONS
                  NO_FORM            = 1
                  NO_FUNCTION_MODULE = 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 smartform
         CALL FUNCTION LW_FUNC_NAME
             EXPORTING
                  CONTROL_PARAMETERS = TH_CONTROL       " Preview
                  OUTPUT_OPTIONS     = TH_PRINT         " The print default
                  USER_SETTINGS      = SPACE
                  W_NAME             = W_NAME
                  W_REPORT           = W_REPORT
                  W_REPORTDATE       = SY-DATUM
                  W_TONAME           = W_TONAME
                  W_PERIOD           = W_PERIOD
                  W_YEARTYPE         = W_YEARTYPE
                  W_FINYEAR          = W_FINYEAR
                  W_LASTDATE         = W_LASTDATE_1
              IMPORTING
                  job_output_info    = w_return
              TABLES
                  T_TAB              = T_DISPLAY_1        " Table for output
              EXCEPTIONS
                  FORMATTING_ERROR   = 1
                  INTERNAL_ERROR     = 2
                  SEND_ERROR         = 3
                  USER_CANCELED      = 4
                  OTHERS             = 5.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    ****...................................CONVERT TO PDF...............
      DATA: P_BIN_FILESIZE TYPE I,
            P_OTF type table of ITCOO,
            P_DOCS type table of DOCS,
            P_LINES type table of TLINE.
      P_OTF[] = w_return-OTFDATA.
      CALL FUNCTION 'CONVERT_OTF_2_PDF'
        IMPORTING
          BIN_FILESIZE = P_BIN_FILESIZE
        TABLES
          OTF = P_OTF
          DOCTAB_ARCHIVE = P_DOCS
          LINES = P_LINES
        EXCEPTIONS
          ERR_CONV_NOT_POSSIBLE = 1
          ERR_OTF_MC_NOENDMARKER = 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 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
        FILENAME                        = 'C:/AAA.PDF'
        FILETYPE                        = 'BIN'
      TABLES
        DATA_TAB                        = P_LINES.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Payment Proposal error in F111

    Hello,
    We recieve the below error in the proposal.
    the parameters are ,US01  company code, U- payment method.
    First we create payment request in Treasury system with tcode : RVND in curr INR then run f111.
    INR is also specified in FBZP for payment method U.
    When we use any other foreing curr the payment is successful with the same payment method and same house bank
    Please advice.
    Thanks very much.
      ERROR
    Company codes US01/US01 do not appear in proposal 11/24/2009 INR-1R; correct
    Message no. FZ 003
    Diagnosis
    No data exists for the specified paying company code US01 and the specified sending company code US01 in payment proposal 11/24/2009 INR-1R.
    System Response
    The payment proposal cannot be edited.
    Procedure
    Check the flow trace and payment proposal list in order to determine why the specified company codes are not contained in the proposal.

    Hi,
    Did you try this?
    Call up the Payment Program for Payment Requests (F111). Choose Environment ® Maintain Configuration to make your Customizing settings for the payment program.
    Activities
    To start a payment run, call the Payment Program for Payment Requests (F111). The Automatic Payment Transactions for Payment Requests screen appears.
           1.      Enter a date and payment run ID.
    All information relating to the payment run is stored under these values.
           2.      Choose Edit ® Parameters ® Maintain Payment Run Parameters. The Automatic Payment Transactions: Parameters screen appears.
    Enter the values for the parameters.
           3.      TheDynamic selections function gives you the option of using other fields for selecting payment requests.
           4.      You can create an additional log by choosing Additional Log.
           5.      Save the parameters for the payment run.
           6.      To generate a proposal run or a payment run, choose Edit ® Proposal ® Schedule or Edit ® Payment ® Schedule.
    Specify a starting time (or immediate start) and a computer, if required.
           7.      If you create a proposal, you can display the log, payment list and exception list. You can edit or delete the payment proposal. If you are satisfied with this payment proposal, choose Edit ® Payment ® Schedule and execute the update run.
           8.      After the payment run, the system generates the posting documents, the payment and exceptions lists, and the payment media.
    Let me know if you are still facing an issue.

  • Problem to spool when Executing reports in background

    Hi experts,
    I  executed  reports in backgroud , but when i checked in SM37 the generated spool not given proper layout format.
    This problem occurs when report having more columns.
    plz help me earliest.
    Regards,
    jyotsna

    Hi jyotsna,
    this happens with ALV output because the output format is determined at runtime.
    You can control the print format used: Just fromyour reports list in online mode, choose PRINT. A Popup should come up letting you specify the printer, number of copies, pages to be printed and so on.
    At the bottom of the popup you have the Properties button. This button opens the overview sceen for all the available print parameters. Double-Click the Format section, choose a format you want to use.The the Specifications button takes you to another screen. Here you can choose 'Valid for this report only' and Check the Background checkbox.The push the 'Copy settings' button. Then Enter to close all the popups. This should help. Additionally you can set a default layout variant for your list to be used.
    For this, in the ALV list, use Menu Settings-Layout-Layout Management. Here yu can set a default variant.
    Regards,
    Clemens

  • Backgroud task of a workflow set to status "ready"

    Hi all, We have a worflow working since some years ago and now suddenly one problem has started to ocurr...
    sometimes, one of the backgroud steps of this workflow is not processed in backgroud by WF-BATCH as expected but it remain in status "READY"....this is not intended and what we are expecting is that this task is processed in background without any user input inmediately after the previous task....
    Until today, this task has worked without problems but now we got this task not processed but waiting in status "ready"...this only occurs sometimes, not with all instances of this workflow but only sometimes in a random way....
    I can´t see anything wrong in the template...only thing I see is that this background task is executed right after a "dialog task" where user need to aprove or reject the document in workflow. this "dialog step" use the standard task "TS00008267" (generic decission task) as base and this standard task has "latest end" setted (I don´t know if this can be the problem or always has been in this way with this "latest end" active...)
    any tips???? someone with same problems????
    Thanks in advance....

    hi Rob, first at all, thanks for your fast reply, much appreciated mate....
    surfing this forum I just found this post () , I think, is same problem, related to RSWERRE program jobs....
    I´ve seen that all of those background workitems in status "ready" that we expected to be processed automatically are from same day, and in that day we suffered a problem related to jobs system so I think that is the key of my problem....no wrong workitems in status "ready" others days than that one when we suffered that problem with jobs systems so pretty sure this is my case...
    anyway, thanks a lot for your tips...if I found that my problem continues I will be sure of check what you are pointing me...
    Thanks.
    Miguel.

  • Error during F111

    Hi All,
    I'm facing this error message during editing proposal created via F111.
    When I try to re-allocate the payment method, I get error message FZ032
    "Account 14201103 is contained in proposal 17.03.2010 TEST3R; release not possible
    Message no. FZ032
    Diagnosis
    Items in account 14201103 are contained in payment proposal 17.03.2010 TEST3R. To avoid overlaps, no releases for payment can be carried out for this account here.
    System Response
    The release of the item is rejected.
    Procedure
    If the item is to be paid, it is possible to edit the other specified proposal and to release the item there."
    I've checked payment run ... date 17.03.2010 TEST3 -> the process is finished until payment doc created.
    I don't understand what's going on. Anyone tell me ?
    Regards,
    -M-

    Hi
    The error message says that the vendor is already blocked in TEST3R, whereas you said that you have checked TEST3.  Hope you have checked the correct payment run and this is only a typo mistake.
    Also check whether any entry exists in table REGUS for this payment ID for this vendor.  If the table entry exists, inspite of the payment run is executed, you may have to search for suitable OSS note or contact SAP OSS.
    Hope this helps.
    Regards

  • Text is missing in documents created through F110& F111

    Hi Friends,
    We are facing an issue . Text is getting blanked in documents created via transactions F110 & F111. Please help.
    Thanks & Regards
    Bhairavi

    Hi,
    In case of F110, it is not possible to get a text in the Doc generated since it is an Auto Generated entry. You will not get Chq. No. also after F110 execution. For that separate Abap program we need to run.
    The thing is what we are not facing a problem with F110 but getting a problem with F111. Since you have mentioned that F111 is also working properly (Except Text updation), would like to request you as, if you are having a documetation of setting done for F111 pls. forward the same to us or if you have come across of the following error pls. tell us the solution.
    After executing F111, We are getting an error message as "F111 - Error Message - Program RFZALI20 : No records selected"  
    Pls. help
    Regards,
    Shridhar
    FICO

Maybe you are looking for

  • The same Object Version Number for the same person id multiple times

    Hello all, I am currently facing an issue with HRMS tables and the object version number for employees. I am trying to write a report but due to the same object version number for the same person appearing in several row i am getting duplicate inform

  • Safari 5.1.2 Freeze download button

    Hi I've recently re-installed OS X Lion on my new 13" MacBook Pro (late 2011), and in the beginning everything worked fine. Within the last couple of weeks I've been bothered by a problem with safari Version 5.1.2 (7534.52.7). When I've downloaded a

  • HT5622 my Iphone was stolen, how do I get my contacts back?

    my iphone was stolen i have saved everything on itunes and icloud but my laptop was stolen aswell now how can i get my contacts back

  • Libraries not showing up in Pictures folder

    Oh, woe is me. I thought I had everything working just fine with iPhoto '08 but just now I was looking for some photos in one of the 5 libraries I have. I went to my Home Folder--->Pictures and there is a folder there but a few days ago, the librarie

  • Log on Information incomplete

    Hello, I'm working on an app that accesses a SQL Server to populate the data on the crystal report. When I set the crystal report view's report source after loading in the log on criteria it somehow doesn't have the database in the text field in the