Envio de e-mail B2B via Abap - erro na visualização do XML

Boa tarde,
Em virtude da minha versão (GRC 10.0 e NW 7.11), apenas poderia implementar a solução de B2B dinâmico, caso utilizasse Java Mapping. Como meu conhecimento em Java é pequeno, optei por enviar o e-mail a partir do Abap do GRC.
O XML que estou gerando está com erro na tag <ns1:Transforms>. As tags acima desta estão ok.
Comparei com o XML original e os códigos-fontes são EXATAMENTE iguais.
O erro é "Página XML não pode ser exibida". Na instrução, aparece a seguinte informação: "Não é possível exibir a entrada XML usando a folha de estilos XSL".
Alguém pode me ajudar?
Se julgarem que, apesar de meu processo ser de NFe, preciso abrir a thread em outro tópico, basta avisar.
Obrigado.
Abraços,
Flavio.
Edited by: fgalmeida on Oct 6, 2011 7:09 PM

Resolvido.
Olhando o fonte do XML, verifiquei que ao final do arquivo haviam espaços em branco.
A solução foi passar o tamanho do xstring no parâmetro i_attachment_size do método add_attachment da função cl_document_bcs, conforme abaixo:
DATA lv_size TYPE so_obj_len.
  lv_size = xstrlen( lv_content_xml ) .
  CALL METHOD document->add_attachment
    EXPORTING
     i_attachment_size    = lv_size
      i_attachment_type    = 'xml'
      i_attachment_subject = 'XML NFe'
      i_att_content_hex    = lt_content_hex.
Obrigado.
Flavio.

Similar Messages

  • Creating a PDF-Mail-Attachment via Abap Mapping possible ?

    Hi folks,
    I am trying to build a szenario like: Getting an Idoc -> sending it to abap mapping -> map a pdf from smartforms in abap -> map the from/to for the mail payload -> come back from abap mapping -> send it with the mail adapter .
    But now I am stuck at the point "coming back from abap mapping", because the pdf -data seems to become unreadable because of conversion. I am using Ixml and trying to attach the create pdf (looks hex-right at that point) by method create_simple_element as content-tag of the mail. But after rendering and coming back out of mapping, it seams that that data is not converted from xstring back in the right way. Can someone give a hint ? Is that way by IXML not possible for data including binary-data ? Have I to go another way?
    Thanks in advance
    Detlef

    > as content-tag of the mail.
    Sometimes I have to read the request several times to find the issue:
    No you cannot put a binary as part of an XML element.
    You can only send a plain binary as payload, so the whole mail would be nothing besides the PDF.
    In PI 7.1 you can create also an additional attachment out of mapping, but I do not know if this works for ABAP mapping also.
    The whole "I want to send an email with attachment out of PI" topic is not supported from PI development in any way.
    So you have to write a lot of code (especially Java code) to achieve this.
    > Regarding your opinion. Its based on customer requirements to have central focal point in dezentral landscape.
    The PI expert has to advise the customer for the scenarios. That is part of the job.

  • Envio de e-mail via SAP

    Estou tenando configurar o envio de e-mail do Meu SAP e não estou conseguindo...
    Erre é o erro que me retorna.
    Internal error: CL_SMTP_RESPONSE ESMTP error code is not
    known. 503 503 5.0.3 <vpn.empresa.com.br[200.170.217.189]>:
    Cl
    Já olhei diversos materias que favam para configurar parametros nas transaçoes scot sost scif mais nada funcionou...
    e só para orientar o sistema que eu preciso usar de e-mail é localweb ou seja SMTP com autenticação, outra coisa que não achei onde fazer no SAP...
    Se alguém souber como resolver isso fico agradecido.

    Olá Itamar,
    informação adicional:
    - as notas #[1091583|https://bosap-support.wdf.sap.corp/sap/support/notes/1091583] e #[1098108 |https://bosap-support.wdf.sap.corp/sap/support/notes/1098108]explicam que autenticação através de SMTP não é suportada. O erro 503 é "Authentication required" mas o lado da SAP da configuração não sabe como interpretar o problema, justamente pq não há suporta para essa feature
    O workaround desse problema o pessoal já escreveu acima
    Um abraço,
    Tomas Black

  • Send a mail via ABAP program

    Hello Experts,
    I want to send mail via ABAP program with the following requirements :
    1. Recipient is OUTLOOK email -id
    2. Sender address has to be an external email-id
    3. Send mail as CC and BCC also to other email-id.
    Is there any function module which can satisfy all the above requirements.
    Regards,
    Mansi.

    hi,
    this code will definately help you just go through it:
    firstly  exported the data to memory using the FM LIST_FROM_MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = t_listobject
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    IF sy-subrc 0.
    MESSAGE e000(su) WITH text-001.
    ENDIF.
    then i converted it into ASCII using LIST_TO_ASCI,
    CALL FUNCTION 'LIST_TO_ASCI'
    TABLES
    listasci = t_xlstab
    listobject = t_listobject
    EXCEPTIONS
    empty_list = 1
    list_index_invalid = 2
    OTHERS = 3.
    IF sy-subrc NE 0.
    MESSAGE e003(yuksdbfzs).
    ENDIF.
    This gives the data in ASCII format separated by '|' and the header has '-', dashes. If you use this internal table directly without any proccesing in SO_NEW_DOCUMENT_ATT_SEND_API1, then you will not get a good excel sheet attachment. To overcome this limitation, i used cl_abap_char_utilities=>newline and cl_abap_char_utilities=>horizontal_tab to add horizontal and vertical tabs to the internal table, replacing all occurences of '|' with
    cl_abap_char_utilities=>horizontal_tab.
    Set the doc_type as 'XLS', create the body and header using the packing_list and pass the data to be downloaded to SO_NEW_DOCUMENT_ATT_SEND_API1 as contents_bin.
    This will create an excel attachment.
    Sample code for formatting the data for the attachment in excel format.
    u2022     Format the data for excel file download
    LOOP AT t_xlstab INTO wa_xlstab .
    DESCRIBE TABLE t_xlstab LINES lw_cnt.
    CLEAR lw_sytabix.
    lw_sytabix = sy-tabix.
    u2022     If not new line then replace '|' by tabs
    IF NOT wa_xlstab EQ cl_abap_char_utilities=>newline.
    REPLACE ALL OCCURRENCES OF '|' IN wa_xlstab
    WITH cl_abap_char_utilities=>horizontal_tab.
    MODIFY t_xlstab FROM wa_xlstab .
    CLEAR wa_xlstab.
    wa_xlstab = cl_abap_char_utilities=>newline.
    IF lw_cnt NE 0 .
    lw_sytabix = lw_sytabix + 1.
    u2022     Insert new line for the excel data
    INSERT wa_xlstab INTO t_xlstab INDEX lw_sytabix.
    lw_cnt = lw_cnt - 1.
    ENDIF.
    CLEAR wa_xlstab.
    ENDIF.
    ENDLOOP.
    Sample code for creating attachment and sending mail:
    FORM send_mail .
    u2022     Define the attachment format
    lw_doc_type = 'XLS'.
    u2022     Create the document which is to be sent
    lwa_doc_chng-obj_name = 'List'.
    lwa_doc_chng-obj_descr = w_subject. "Subject
    lwa_doc_chng-obj_langu = sy-langu.
    u2022     Fill the document data and get size of message
    LOOP AT t_message.
    lt_objtxt = t_message-line.
    APPEND lt_objtxt.
    ENDLOOP.
    DESCRIBE TABLE lt_objtxt LINES lw_tab_lines.
    IF lw_tab_lines GT 0.
    READ TABLE lt_objtxt INDEX lw_tab_lines.
    lwa_doc_chng-doc_size = ( lw_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
    lwa_doc_chng-obj_langu = sy-langu.
    lwa_doc_chng-sensitivty = 'F'.
    ELSE.
    lwa_doc_chng-doc_size = 0.
    ENDIF.
    u2022     Fill Packing List For the body of e-mail
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = 'RAW'.
    APPEND lt_packing_list.
    u2022     Create the attachment (the list itself)
    DESCRIBE TABLE t_xlstab LINES lw_tab_lines.
    u2022     Fill the fields of the packing_list for creating the attachment:
    lt_packing_list-transf_bin = 'X'.
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = lw_doc_type.
    lt_packing_list-obj_name = 'Attach'.
    lt_packing_list-obj_descr = w_docdesc.
    lt_packing_list-doc_size = lw_tab_lines * 255.
    APPEND lt_packing_list.
    u2022     Fill the mail recipient list
    lt_reclist-rec_type = 'U'.
    LOOP AT t_recipient_list.
    lt_reclist-receiver = t_recipient_list-address.
    APPEND lt_reclist.
    ENDLOOP.
    u2022     Finally send E-Mail
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = lwa_doc_chng
    put_in_outbox = 'X'
    commit_work = 'X'
    IMPORTING
    sent_to_all = lw_sent_to_all
    TABLES
    packing_list = lt_packing_list
    object_header = lt_objhead
    contents_bin = t_xlstab
    contents_txt = lt_objtxt
    receivers = lt_reclist
    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.
    Hope it will help you
    regards
    Rahul sharma

  • Boa noite. O problema ocorre com qualquer navegador. Hoje liguei para a Microsoft, para pedir ajuda na configuração do e-mail que aparece o erro #872. O técnico

    Boa noite.
    O problema ocorre com qualquer navegador.
    Hoje liguei para a Microsoft, para pedir ajuda na configuração do e-mail que aparece o erro #872.
    O técnico entrou remotamente e fez todos os estes possíveis e imagináveis.
    Fiquei remotamente durante uma hora e trinta minutos. E ele não conseguiu resolver.
    O problema não é com o outlook é com o GMAIL.
    Após vários testes, agora aparece a seguinte mensagem de erro:
    “Servidor respondeu: 421 4.7.0 Temporary S” pelo outlook e pelo GMAIL (#872)
    O técnico da Microsoft informou que o problema é com o GMAIL.
    Por favor estou desesperada, desde 10 de julho de 2014 não recebo e envio e-mail da conta:
    Tenho essa conta para trabalho e pessoal, isso esta causando muito prejuízos.
    POR FAVOR ME AJUDE A RESOLVER ISSO.
    Desde já muito obrigada
    Elisabeth
    De: ****** [mailto:******] Em nome de Cesar JB via Fórum de Ajuda do Gmail
    Enviada em: segunda-feira, 28 de julho de 2014 07:57
    Para: *****
    Assunto: Re: ERRO (@872)
    Olá Elisabeth,
    O mesmo problema ocorre quando você utiliza um navegador (Chrome, Firefox ou Internet Explorer) ou somente quando você utiliza um programa cliente de email (ex: Outlook).
    Se estiver usando um navegador, experimente fazer a limpeza do cachê e veja se a referência abaixo sobre erros no Gmail te auxilia.
    Abraço,
    Cesar JB
    On Sunday, July 27, 2014 10:48:00 PM UTC-3, Elisabeth Reboucas wrote:
    gmail
    recebo uma mensagem de erro. (@872).
    sempre que mando email da minha conta principal. POR FAVOR QUEM PODE AJUDAR.
    A RESPOSTA POSTADA EM 20/07/14 NAO RESOLVEU O PROBLEMA.
    "Erro
    Ops... ocorreu um erro de servidor e seu e-mail nao foi enviado. (#872)
    OK"
    a mensagem de erro esta escrita acima.
    Por favor preciso de ajuda.
    Obrigada.
    Elisabeth
    <hr>
    ''emails removidos para privacidade dos mesmos'' - Diego Victor

    Boa Noite Elisabeth,
    Sua explanação sobre o seu problema está um pouco confusa e com poucas informações, o que dificultada a melhor resposta e/ou a resposta correta. Porém que você está com problemas no uso do Gmail pelo seu aparelho Mobile, eu pesquisei alguns problemas e pré requisitos para que esse uso seja feito sem maiores complicações.
    Você pode acessar o Gmail pela Internet em navegadores como Google Chrome, Firefox, Internet Explorer e Safari no seu computador. Para acessar o Gmail com um navegador instalado em um dispositivo móvel, esse dispositivo deve atender a estes requisitos mínimos.
    '''Requisitos Mínimos'''
    Para acessar o Gmail para celular, o navegador de seu celular deve atender a alguns requisitos mínimos.
    Primeiramente, verifique se seu navegador é compatível com XHTML. Caso não tenha certeza, visite http://www.google.com/xhtml e faça uma pesquisa. Se não funcionar, seu navegador pode não ser compatível com XHTML.
    Você pode entrar em contato com seu provedor de serviços para celular para verificar os seguintes requisitos:
    1. Seu navegador deve ter os cookies ativados e sua rede também deve permitir cookies. A configuração de cookies geralmente está localizada nas configurações do navegador de seu telefone.
    2. Sua rede deve permitir tráfego SSL seguro.
    3. O navegador de seu celular deve ter um comprimento de URL de 2000 bytes.
    4. O navegador de seu celular deve permitir redirecionamentos de 10.
    Para usar o Gmail, ative os cookies e o JavaScript'''
    Independentemente do tipo do seu navegador, você precisa estar com os cookies ativados para usar o Gmail. Além disso, se seu navegador for compatível, ative o JavaScript. Pesquise instruções no Google sobre como ativar os cookies e o JavaScript no seu navegador.
    Espero que com isso você resolva o seu problema ou a menos tenha ajudado a ajuda-lo.
    Um grande abraço.

  • PO print sent to multiple mail id  via email

    Hi,
    We are using the standard output type NEU, medium 5 (external send).i maintained multiple mail id in single vendor master,
    i want to sent po print out for multiple mail id via email,after wt are all configurations do as a mm and abap consultant,plz
    suggest.
    Regards
    Sam

    Hi,
    You requirement is not specific.You want to print PO or want send PO via E-mail to vendor.
    You can maintain multiple E-mail ID's for a vendor master.In standard possible to send PO by e-mail to vendor to single e-mail ID ONLY. If you want to send PO by e-mail in multiple (e-mail) ID's, you can go for development with ABAPer for using of function module OR can work with group e-mail concept( check with system admin team).
    Regards,
    Biju K

  • Problem sending xls file in an attachment via ABAP proxy

    Hello,
    I have in tmp directory a xls file, I tranfer such file to a table, and afterwards I send in an attachment via ABAP proxy, here is the code:
         l_attachment        TYPE REF TO if_ai_attachment,
            lt_attach           TYPE prx_attach,
            l_name              TYPE string,
            lx_string           TYPE xstring,
            l_string            TYPE string,
            l_type              TYPE string,
            des                 TYPE string.
      CLASS cl_ai_factory DEFINITION LOAD.
      DATA:    BEGIN OF itab OCCURS 0,
               raw(255) TYPE x,
             END OF itab.
      DATA: l_controller TYPE REF TO if_ai_posting_controller.
      DATA: it TYPE zhcm_mt_segur_out.
      CREATE OBJECT prxy.
      OPEN DATASET orig FOR INPUT IN binary MODE.
      READ DATASET orig INTO itab-raw.
      WHILE sy-subrc = 0.
        APPEND itab.
        READ DATASET orig INTO itab-raw.
      ENDWHILE.
      CLOSE DATASET orig.
      LOOP AT itab.
        CONCATENATE lx_string itab-raw INTO lx_string in byte mode.
      ENDLOOP.
      L_NAME = 'Segur.xls'.
      L_TYPE = CL_AI_ATTACHMENT=>IF_AI_ATTACHMENT~C_MIMETYPE_EXCEL.
      TRY.
          L_ATTACHMENT =
            CL_AI_FACTORY=>CREATE_ATTACHMENT_FROM_binary(
                      P_DATA = LX_STRING
                      P_TYPE = L_TYPE
                      P_NAME = L_NAME ).
          APPEND L_ATTACHMENT TO LT_ATTACH.
          L_CONTROLLER = CL_AI_FACTORY=>CREATE_CONTROLLER( ).
          L_CONTROLLER->SET_ATTACHMENTS( LT_ATTACH ).
          CALL METHOD PRXY->EXECUTE_ASYNCHRONOUS
            EXPORTING
              CONTROLLER = L_CONTROLLER
              OUTPUT     = IT.
          COMMIT WORK.
        CATCH CX_AI_SYSTEM_FAULT .
          DATA FAULT TYPE REF TO CX_AI_SYSTEM_FAULT .
          CREATE OBJECT FAULT.
          WRITE :/ FAULT->ERRORTEXT.
      ENDTRY.
    I am using a Mail receiver channel, I receive a mail, with to attachments, one .xml and the other one .bin, I save it to my computer and I change the extension to .xls and when I try to open it, the file is not valid and can be opened after being repaired. What Im doing wrong? I would like to receive a valid xls file, what i should change?
    Thanks a lot,
    Luis

    Hi,
    yes I know, I have used the MessageTransformBean module, and the PayloadSwapBean module. But which parameter I should use for leaving only one attachement in the e-mail. I did this configuration:
    1
    localejbs/AF_Modules/MessageTransformBean
    Local Enterprise Bean
    <b>trans</b>
    2
    localejbs/AF_Modules/PayloadSwapBean
    Local Enterprise Bean
    <b>swap</b>
    3
    localejbs/AF_Modules/MessageTransformBean
    Local Enterprise Bean
    <b>trans1</b>
    4
    localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
    Local Enterprise Bean
    mail
    <i><b>Module configuration</b></i>
    trans
    Transform.ContentDisposition
    inline
    swap
    swap.keyName
    payload-name
    swap
    swap.keyValue
    Segur
    trans1
    Transform.ContentDescription
    Segur
    trans1
    Transform.ContentDisposition
    attachment;filename="Segur.xls"
    trans1
    Transform.ContentType
    application/vnd.ms-excel;name="Segur.xls"
    In the e-mail I get one attachement without name .xml and another one Segur.xsl, and I want only one attachment, the last one. What I should change in my configuration??
    Best regards,
    Luis

  • Attachments via ABAP Proxy

    I have come across one client requirment where he needs to send the txt/pdf file as an attachment from R/3, currently that interface is using the ABAP Proxy, is there any idea about How to send the attachments via ABAP Proxy?

    Hi,
    Refer
    XI: RFC or ABAP Proxy ? ....ABAP Proxies with attachments
    /people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
    Problem sending xls file in an attachment via ABAP proxy
    Receive mail with PDF attachment into XI and send to ABAP proxy
    http://help.sap.com/saphelp_nw70/helpdata/en/51/d5cd16235e4643ae8ec92395c4ad97/frameset.htm
    Thanks
    Swarup

  • Pedido de Compra - Envio de e-mail para o fornecedor

    Boa tarde pessoal
    Estou com uma dúvida sobre o processo para envio de e-mail do Pedido de Compra para o fornecedor.
    Hoje utilizamos o e-mail do último aprovador no Pedido de Compra para que seja enviado ao fornecedor.
    Existe alguma configuração para que no momento do envio seja utilizado o e-mail cadastrado no Grupo de Compradores?
    Obs.: o objetivo é utilizar o e-mail do Grupo de Compradores informado na aba "Dados organizacionais".
    Obrigado
    José Roberto

    Olá Neto,
    Se você não deseja permitir novos lançamentos de fatura ou movimento de mercadoria tem que flegar o campo delivery completed indicator (EKPO-ELIKZ).
    Para fazer isso veja a questão '8' da nota 1093582.
    1093582 - FAQ: Delivery complete indicator ELIKZ
    8.  Question
    Is there any report to set ELIKZ?
    Answer
    You can use the report Z_SET_ELIKZ3 only if EKPO-EGLKZ is set and the
    'Issued quantity', the 'Quantity of goods received' and the 'Quantity
    delivered (stock transport order)' are the same.
    This report will only affect documents that have already been posted. An
    automatic setting of the 'Delivery completed' indicator (EKPO-ELIKZ) in
    the online processing of the transaction is not supported. See Note
    160525 for more information.
    Ou seja, você deve criar e executar o report Z_SET_ELIKZ3 para setar o delivery completed indicator para PO em questão.
    você poderia também setar esse campo manual mente na tabela EKPO.
    Por favor:
    execute a tabela EKPO na SE16 para a PO afetada,
    selecione a linha/entrada da tabela,
    vá pelo menu Table Entry->Change
    marque o campo  ELIKZ como 'X' ao invés de branco..
    Espero que essa informação lhe ajude.
    Atenciosamente,
    Fábio Almeida
    Consultor MM

  • How to extract data from BPC InfoCube via ABAP program?

    Hi experts!!
    I tried to extract data from a BPC InfoCube via ABAP program, but I did'n have succeed.
    I used the function 'RSDRI_INFOPROV_READ' to extract data from standard InfoCubes such as '0COPC_C07' and it run OK! However, when I change the InfoCube name to '/CPMB/WAIX8NE' (BPC InfoCube), everything goes wrong...
    Is there any difference between extracting data from BPC and standard InfoCubes?
    Thank you all!

    Moderator message - Welcome to SCN.
    But please do not cross and duplicate post.
    Thread locked.
    Rob

  • Push data from BW 3.5 to XI 3.0 via ABAP proxy

    Hi,
      I have the following scenario: I´m in BW 3.5 trying to send data to XI 3.0 via ABAP proxy. I´ve already found a "How-to" to do build this scenario, but something does not work. I think that problem is when a try do the logon from BW to XI because I got the message "logon data not provided" on http service in XI. I´ve already configure an RFC Destination(SM59) as R/3 connection(type 3) and another as HTTP connection to R/3(type H) and both are correct. Someone knows where I configure the user/pass to logon from BW Intergration Server to XI Integration Server?
    Regards,
    Rafael Soares

    Hello fellows!
       I discovered that my problem was configuration on SXMB_ADM transaction.
       Thank you very much for your help!
    Best regards.
    Rafael

  • Delete Overlapping Requests - by Filename via ABAP Routine

    Hi SDN Community
    Do you know if it is possible to set the delete overlapping request parameters to recoginse the file name, and remove it via the derivation of the file name via an ABAP Routine.
    I am using an ABAP routine to derive the flat flat file upon loading, but do not know the syntax, or if it is possible to set this equivalent code into the delete overlapping request Routine area
    (The code basically derives the first day of the calendar week, for previous weeks in the Do n times Loop
    Thank you.
    Simon
    DATA: ld_CWEEK         TYPE scal-week,
          ld_DATE          TYPE SY-DATUM,
          ld_DATE1         TYPE SY-DATUM,
          lc_DIRECTORY(30) TYPE c,
          ln_YYYY(4)       TYPE n,
          ln_WW(2)         TYPE n.
    *Derive week from sy-datum
    ld_date = SY-DATUM.
    Determine the calendar week from the entered calendar date
      CALL FUNCTION 'DATE_GET_WEEK'
        EXPORTING
          date           = ld_date
        IMPORTING
          week          = ld_cweek
        EXCEPTIONS
          date_invalid = 1
          OTHERS        = 2.
    Get the First day of the week
            CALL FUNCTION 'WEEK_GET_FIRST_DAY'
              EXPORTING
                week         = ld_CWEEK
              IMPORTING
                date         = ld_DATE1
              EXCEPTIONS
                week_invalid = 1
                OTHERS       = 2.
      Need to find the previous calendar week and reconvert to the first
      day in order to accomodate weeks less than 7 days
      Get the last day of the current calendar week - 2
        DO 2 TIMES.
            ld_DATE1 = ld_DATE1 - 1.
    Determine the calendar week from the last day of the previous week
            CALL FUNCTION 'DATE_GET_WEEK'
              EXPORTING
                date         = ld_DATE1
              IMPORTING
                week         = ld_CWEEK
              EXCEPTIONS
                date_invalid = 1
                OTHERS       = 2.
    Get the First day of the week
              CALL FUNCTION 'WEEK_GET_FIRST_DAY'
                EXPORTING
                  week         = ld_CWEEK
                IMPORTING
                  date         = ld_DATE1
                EXCEPTIONS
                  week_invalid = 1
                  OTHERS       = 2.
        ENDDO.
    *ln_YYYY = ld_CWEEK(4).
    ln_YYYY = ld_DATE1(4).
    ln_WW = ld_CWEEK+4(2).
    *DIRECTORY represnts path where file is stored .
    lc_DIRECTORY = '/interfaces/EDW/data/CSM/'.
    CONCATENATE lc_DIRECTORY
    ld_date '_WEEK' ln_WW '_c1_pri_' ln_YYYY '.csv' into p_filename.
      'MIC_NT_' ld_date1 '_' ln_YYYY '.csv' into p_filename.

    Thank you for your response Debanshu
    However, i could not find this process type in the process chain area.
    Is this where you meant, can you please give me more detailed steps including long syntax of names of process types
    We are on BW 3.50
    i assumed the filename had to be constructed via abap according to some of the sdn replies i've searched through.
    Thank you.
    Simon

  • Mail Sender to Abap Proxy Receiver with Attachements

    Hi All,
    Scenario: I need to create a ticket in Solman from a mail. I intend to do the scenario as Mail sender to Abap Proxy receiver asynchronous.
    I have configured my sender mail adapter and am able to get the mails in XI. The attachements also appear in Inbound payload as MailAttachement-1, MailAttachement-2 etc. I have checked use mail packege and keep attachements in sender adapter.
    Transport Protocol: IMAP4
    Message Protocol: XIPAYLOAD
    Queries:
    1. My Inbound Data Type is the mail Package -- ximail30_xsd. Here in sxmb_moni I can see the mail attributes like from, to and the mail body in content. But How can I read the attachements in my message mapping.
    2. How can I pass these attachements to Abap Proxy ( I do not need to alter attachments only pass to proxy ). These attachements have to be attached to the Solman ticket in SOLMAN server.
    Appreciate your kind response to my above queries.
    Thanks.
    Regards,
    Siddhesh S.Tawate
    PS: I have tried using PayloadSwapBean in adapter module but still the content at source remains same.

    Hi,
    Please find below the part of code that might help you. I have given code only responsible for attachements part of the ticket.
    loop at lt_attach into l_attachment.
            count = count + 1.
            if count = 1.
              first_line = 1.
            endif.
            l_type = l_attachment->GET_CONTENT_TYPE( ).
            split l_type at '"' into l_type
                                     file_name
                                     l_name.
            l_name = file_name.
            split file_name at '.' into file_name
                                        file_type.
            l_xstring = l_attachment->GET_BINARY_DATA( ).
            strlen = xstrlen( l_xstring ).
            Compute int = ( strlen div 255 ).
            Compute rem = ( strlen mod 255 ).
            if rem <> 0.
              int = int + 1.
            endif.
            count1 = int.
            if count = 1.
              last_line = count1.
            else.
              if int = 1.
                first_line = last_line.
              else.
                last_line = first_line + count1.
              endif.
            endif.
            wa_APPX_HEADERS-APPXNO = count.
            wa_APPX_HEADERS-DESCR = l_name.
            wa_APPX_HEADERS-FILETYP = file_type.
            wa_APPX_HEADERS-FILENAM = l_name.
            wa_APPX_HEADERS-FILEFM_UL = 'BIN'.
            wa_APPX_HEADERS-FIRSTL = first_line.
            wa_APPX_HEADERS-LASTL = last_line.
            wa_APPX_HEADERS-FILELEN = strlen.
            wa_APPX_HEADERS-LAST_USR = sy-uname.
            GET TIME STAMP FIELD wa_appx_headers-TIMESTAMP.
            append wa_APPX_HEADERS to it_APPX_HEADERS.
            while count1 <> 0.
              count1 = count1 - 1.
              if count1 <> 0.
                wa_APPX_LINES_bin-LINE = l_xstring+0(255).
                shift l_xstring left by 255 places in BYTE MODE.
              ELSE.
                wa_APPX_LINES_bin-LINE = l_xstring.
              endif.
              append wa_APPX_LINES_bin to it_APPX_LINES_bin.
              clear: wa_APPX_LINES_bin, wa_APPX_LINES.
            endwhile.
            first_line = last_line + 1.
            clear: strlen, count1, file_name, file_type, l_type, int, rem, l_xstring, l_attachment.
          endloop.
    CALL FUNCTION 'BAPI_NOTIFICATION_CREATE'
            EXPORTING
              NOTIF_EXT                = wa_NOTIF_EXT
            NOTIF_CRM                = wa_NOTIF_CRM
      IBASE_DATA               =
         IMPORTING
           NUMBER                   = Refnum
           NUMB                     = Numb
           REFNUM                   = Ticket_No
           SYSID                    = SYSID
            TABLES
              NOTIF_PARTNERS           = it_NOTIF_PARTNERS
            NOTIF_NOTES              = it_NOTIF_N_EXT
              NOTIF_SAP_DATA           = it_NOTIF_SAP_DATA
            NOTIF_TEXT_HEADERS       = it_NOTIF_TEXT_HEADERS
            NOTIF_TEXT_LINES         = it_NOTIF_TEXT_LINES
            APPX_HEADERS             = it_APPX_HEADERS
            APPX_LINES               = it_APPX_LINES
            APPX_LINES_BIN           = it_APPX_LINES_BIN
             RETURN                   = RETURN
    Please observe how first and last line of attachement is calculated. That is what created problem for me initially.
    Hope this helps.
    Regards,
    Siddhesh S.Tawate

  • How to assign an output type to a document via ABAP

    Hello Guru's
    I have an interface with a 3rd party system to send information from deliveries. When a delivery is created, we trigger output with 'Post goods issue' and output triggers the interface.
    We need to also trigger output with 'reverse goods issue' and here is the problem. When GI is cancelled I don't know how to trigger the interface having the control from Sales not from MM.
    I'm thinking to use the same approach assigning an output to the delivery in a user-exit of GI cancellation process. But I don't know how to assign this output to a delivery document using ABAP. I have looked for BAPI's or Functions but no successful.
    - Do you know how to assign outputs to documents via ABAP?
    - Do you have any other idea to trigger the interface when GI is cancelled?
    Thank you in advance,
    Manuel

    Hi,
    Guess u need to maintain it in SPAD transaction.
    Cheers
    VJ

  • How to get the file on the content server via ABAP

    Hi
    We are working on an abap that should download certain files stored on the content server and store them on a different file location using  GUI_DOWNLOAD. How can we retrieve the files (PDF's) via ABAP from the contentserver?
    Hope someone can help
    Cheers

    Hi,
    I think the DMS BAPIs could be useful here. For example you can use BAPI Document_CheckOutViewX or Document.CheckOutView2. You will find the documentation for these BAPIs in transaction BAPI under subtopic 'Cross-Application-Components'.
    Further maybe the information in the SAP note 504692 and 796709 could be useful too.
    Best regards,
    Christoph

Maybe you are looking for