<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Messaging field missing, but which? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/messaging-field-missing-but-which/m-p/7247786#M1527153</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for reading, Problem is resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haivng a look into SAPMV45a how they fill XVBPA i found FM 'SD_PARTNER_READ'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;adding this in my coding worked out.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'SD_PARTNER_READ'
    EXPORTING
      f_vbeln  = gs_vbak-vbeln
    TABLES
      i_xvbadr = lt_vbadr
      i_xvbpa  = gt_vbpa.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Sep 2010 06:41:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-09-22T06:41:57Z</dc:date>
    <item>
      <title>Messaging field missing, but which?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/messaging-field-missing-but-which/m-p/7247785#M1527152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi team ABAP,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i was scanning the forum, but well, wasnt able to find something appropriate. &lt;/P&gt;&lt;P&gt;I have to do messaging (calling FM Messaging) for some documents (Sales orders or offers).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;having a look at how SAP does it in SAPMV45A i duplicated their solution, which works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i do following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: lt_part           TYPE TABLE OF  msgpa.

  FIELD-SYMBOLS: &amp;lt;nast&amp;gt;            TYPE table.

  "this is for offers/orders
  CALL FUNCTION 'COMMUNICATION_AREA_KOMKBV1'
    EXPORTING
      msg_trtyp = xtrtyp
      msg_vbak  = gs_vbak
      msg_vbkd  = gs_vbkd
      msg_vbuk  = gs_vbuk
    TABLES
      tab_part  = lt_part
      tab_vbpa  = gt_vbpa
      tab_vbap  = gt_vbap.

  "process output types finding for document
  CALL FUNCTION 'MESSAGING'
    EXPORTING
      applikation                       = gs_tvak-kappl
      msg_objky                         = xobjky
      schema                            = gs_tvak-kalsm
*       PI_OBJTYPE                        =
    TABLES
      msg_part                          = lt_part
    EXCEPTIONS
      applikation_nicht_vorhanden       = 1
      schema_nicht_vorhanden            = 2
      OTHERS                            = 3.

  ASSIGN ('(SAPLV61B)XNAST[]') TO &amp;lt;nast&amp;gt;. "these are the output types found
  IF &amp;lt;nast&amp;gt; IS ASSIGNED.
    lt_nast = &amp;lt;nast&amp;gt;.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;adding teh declarations here before you ask:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*** Global data declarations ***
"Global tables
DATA:     gt_view               TYPE ysdch_dl_prstruc1_tt, "This is the internal table for the table control
          gt_vbap               TYPE TABLE OF vbapvb, "Needed for messaging
          gt_vbpa               TYPE TABLE OF vbpavb, "Needed for messaging
          gt_vbrp               TYPE TABLE OF vbrpvb, "Needed for messaging
          gt_lips               TYPE TABLE OF lipsvb  "Needed for messaging
          .

"Global structures/work areas
DATA:     gs_view               TYPE ysdch_dl_prstruc1, "global work area of output table
          gs_preferences        TYPE ysdch_dl_cust01,   "VKORG based preferences customizing
          gs_vbak               TYPE vbak, "Needed for messaging
          gs_vbuk               TYPE vbuk, "Needed for messaging
          gs_vbkd               TYPE vbkd, "Needed for messaging
          gs_tvak               TYPE tvak, "Needed for messaging
          gs_vbrk               TYPE vbrk, "Needed for messaging
          gs_tvfk               TYPE tvfk, "Needed for messaging
          gs_rv50a              TYPE rv50a,"Needed for messaging
          gs_likp               TYPE likp, "Needed for messaging
          gs_tvlk               TYPE tvlk  "Needed for messaging
          .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So where is my problem?&lt;/P&gt;&lt;P&gt;Well as long as i can do this from SAPMV45A itself all is fine, since then i can use dirty assign technique to fill GS_VBAP and GS_VBPA from XVBAP and XVBPA.&lt;/P&gt;&lt;P&gt;Everything works fine then.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i´m calling this from somewhere else (project-maintainance in my case) i just have VBELN and DOCTYPE for given document so i fill those two structures (GS_VBAP &amp;amp; GS_VBPA) by using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT *
FROM   vbap
INTO   gs_vbap
WHERE  vbeln = lv_vbeln.

and

SELECT *
FROM   vbpa
INTO   gs_vbpa
WHERE  vbeln = lv_vbeln.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, GS_VBAP is of structure VBAPVB and GS_VBPA of structure VBPAVB, means those structures contain some more fields than plain VBAP or VBPA.&lt;/P&gt;&lt;P&gt;One of those fields seems to be important for messaging, since when i do this SELECT thing it doesnt work out.&lt;/P&gt;&lt;P&gt;Actually teh building of the communication area fails. LT_PART gets returned with just ONE record even GS_VBPA contains 5 partners and i had expected six records in LT_PART then.&lt;/P&gt;&lt;P&gt;Anyone got some idea on this? Unfortunatleley neither FM COMMUNICATION_AREA_KOMKBV1 nor FM MESSAGING has a documentation so i gotta ask the experts here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Sep 2010 05:42:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/messaging-field-missing-but-which/m-p/7247785#M1527152</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-22T05:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Messaging field missing, but which?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/messaging-field-missing-but-which/m-p/7247786#M1527153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for reading, Problem is resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haivng a look into SAPMV45a how they fill XVBPA i found FM 'SD_PARTNER_READ'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;adding this in my coding worked out.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'SD_PARTNER_READ'
    EXPORTING
      f_vbeln  = gs_vbak-vbeln
    TABLES
      i_xvbadr = lt_vbadr
      i_xvbpa  = gt_vbpa.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Sep 2010 06:41:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/messaging-field-missing-but-which/m-p/7247786#M1527153</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-22T06:41:57Z</dc:date>
    </item>
  </channel>
</rss>

