<?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: Problem in debug ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-debug/m-p/2610018#M598618</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I have tried ur coding.This code also working for first condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT CE0_M200-FKART eq r_fkart and NOT CE0_M200-fkart is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CE0_M200-WWRPT = CE0_M200-BUDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But second condition  ElseiF CE0_M200-FKART IN r_fkart is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the document type(FKART) of the input structure is not empty and contains any one the  following document type  &amp;#147;B1, B1E, B2, B2E, B3, B3E, B4, BK1, BK3,  FXG,G2, G2S, JGL, RE, VLG2, BM1, BM3, FXL, JLL or L2 .&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-sudhakar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 29 Jul 2007 08:19:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-29T08:19:42Z</dc:date>
    <item>
      <title>Problem in debug ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-debug/m-p/2610012#M598612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I write the logic for my requirement for moving the posting date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logic is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           CASE I_ERKRS.&lt;/P&gt;&lt;P&gt;                  WHEN 'M200'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                    MOVE-CORRESPONDING I_ITEM to CE0_M200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                    IF NOT CE0_M200-fkart is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                      IF NOT CE0_M200-FKART eq r_fkart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        CE0_M200-WWRPT = CE0_M200-BUDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                    ElseiF CE0_M200-FKART eq r_fkart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                      SELECT VBELn FROM VBFA into table i_vbeln&lt;/P&gt;&lt;P&gt;                                           where vbelv = CE0_M200-kaufn&lt;/P&gt;&lt;P&gt;                                                     and VBTYP_V eq 'M'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                      if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        Describe table i_vbeln lines ws_lines .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        If ws_lines = 1 .&lt;/P&gt;&lt;P&gt;                          Read table i_vbeln into wa_vbeln index 1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                          select single budat into ws_budat&lt;/P&gt;&lt;P&gt;                            from bkpf where awtyp = 'VBRK'&lt;/P&gt;&lt;P&gt;                                      and   awkey = wa_vbeln-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                         CE0_M200-WWRPT = ws_budat .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        Elseif ws_lines &amp;gt;= 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                          loop at i_vbeln into wa_vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                          select single matnr from vbrp into ws_c_matnr&lt;/P&gt;&lt;P&gt;                                           where vbeln = wa_vbeln-vbeln&lt;/P&gt;&lt;P&gt;                                           and   matnr = CE0_M200-artnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                            if sy-subrc   = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                              select single budat into ws_budat&lt;/P&gt;&lt;P&gt;                                from bkpf&lt;/P&gt;&lt;P&gt;                                  where awtyp = 'VBRK'&lt;/P&gt;&lt;P&gt;                                  and   awkey = wa_vbeln-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                              CE0_M200-WWRPT = ws_budat .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                              exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                            ENDIF.&lt;/P&gt;&lt;P&gt;                          endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                          ENDIF.&lt;/P&gt;&lt;P&gt;                        ENDIF.&lt;/P&gt;&lt;P&gt;                      ENDIF.&lt;/P&gt;&lt;P&gt;                     endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                    move-corresponding CE0_M200 to E_item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First part is working fine.Means &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                    IF NOT CE0_M200-fkart is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                      IF NOT CE0_M200-FKART eq r_fkart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        CE0_M200-WWRPT = CE0_M200-BUDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;When cursor comes to Elseif part&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        ElseiF CE0_M200-FKART eq r_fkart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it does not check any other conditions,directly cursor go to the move-corresponding CE0_M200 to E_item step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What happend?Is there any wrong in my logic?Please give me ur suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;sudhakar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jul 2007 07:01:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-debug/m-p/2610012#M598612</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-29T07:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in debug ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-debug/m-p/2610013#M598613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I hope that R_FKART is a RANGE field &lt;/P&gt;&lt;P&gt;the you should use IN parameter instead of EQ operation like&lt;/P&gt;&lt;P&gt;IF NOT CE0_M200-FKART &amp;lt;b&amp;gt;IN&amp;lt;/b&amp;gt; r_fkart and&lt;/P&gt;&lt;P&gt;IF CE0_M200-FKART &amp;lt;b&amp;gt;IN&amp;lt;/b&amp;gt;  r_fkart&lt;/P&gt;&lt;P&gt;change this and see again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points for useful Answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jul 2007 07:05:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-debug/m-p/2610013#M598613</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-29T07:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in debug ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-debug/m-p/2610014#M598614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I have changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in ur case posting date(BUDAT) is not moving to the reportind date(WWRPT).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i write the EQ,posting date is moving to reportin date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;second part is not working .From&lt;/P&gt;&lt;P&gt;                               ElseiF CE0_M200-FKART eq r_fkart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks-&lt;/P&gt;&lt;P&gt;sudhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jul 2007 07:10:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-debug/m-p/2610014#M598614</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-29T07:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in debug ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-debug/m-p/2610015#M598615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CASE I_ERKRS.
WHEN 'M200'.

MOVE-CORRESPONDING I_ITEM to CE0_M200.

IF NOT CE0_M200-FKART eq r_fkart and NOT CE0_M200-fkart is initial.

CE0_M200-WWRPT = CE0_M200-BUDAT.

SELECT VBELn FROM VBFA into table i_vbeln
  where vbelv = CE0_M200-kaufn
  and VBTYP_V eq 'M'.
if sy-subrc = 0.

Describe table i_vbeln lines ws_lines .
If ws_lines = 1 .
 Read table i_vbeln into wa_vbeln index 1 .
 select single budat into ws_budat
      from bkpf where awtyp = 'VBRK'
      and awkey = wa_vbeln-vbeln.
 CE0_M200-WWRPT = ws_budat .
endif.


if ws_lines &amp;gt;= 1.
loop at i_vbeln into wa_vbeln.
select single matnr from vbrp into ws_c_matnr
  where vbeln = wa_vbeln-vbeln
 and matnr = CE0_M200-artnr.

if sy-subrc = 0.
select single budat into ws_budat
  from bkpf
  where awtyp = 'VBRK'
  and awkey = wa_vbeln-vbeln.

 CE0_M200-WWRPT = ws_budat .
exit.
ENDIF.
endloop.
ENDIF.

endif.
endif.
move-corresponding CE0_M200 to E_item.
ENDCASE.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please use pretty printer option once you activate the code it will avoid confusion of if and endiff &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points are always welcome&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jul 2007 07:16:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-debug/m-p/2610015#M598615</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-07-29T07:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in debug ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-debug/m-p/2610016#M598616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I will try this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank,&lt;/P&gt;&lt;P&gt;sudha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jul 2007 07:29:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-debug/m-p/2610016#M598616</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-29T07:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in debug ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-debug/m-p/2610017#M598617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Please check the Requirement for  logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.	check whether  Billing document type(FKART) is empty or not .&lt;/P&gt;&lt;P&gt;       1.1.	If the document type is empty  move the posting date(BUDAT) in the  &lt;/P&gt;&lt;P&gt;                 input structure to reporting date to the output structure.&lt;/P&gt;&lt;P&gt;        1.2.	If the document type(FKART) of the input structure is not empty and &lt;/P&gt;&lt;P&gt;               does not contains any of the following doocument types &amp;#147;B1, B1E,  &lt;/P&gt;&lt;P&gt;              B2, B2E, B3, B3E, B4, BK1, BK3, FXG, G2, G2S, JGL, RE, VLG2,   &lt;/P&gt;&lt;P&gt;               BM1,  BM3, FXL, JLL or L2&amp;#148; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              1.2.1.Check that billing document category (VBRK_VBTYP) is not &lt;/P&gt;&lt;P&gt;                      available in the input structure then move the posting date&lt;/P&gt;&lt;P&gt;                     (BUDAT)  in the input structure to reporting date to the output &lt;/P&gt;&lt;P&gt;                     structure.&lt;/P&gt;&lt;P&gt;         1.3.	if the document type(FKART) of the input structure is not empty and &lt;/P&gt;&lt;P&gt;               contains any one the  following document type  &amp;#147;B1, B1E, B2, B2E, B3, &lt;/P&gt;&lt;P&gt;               B3E, B4, BK1, BK3,  FXG,G2, G2S, JGL, RE, VLG2, BM1, BM3, FXL,  &lt;/P&gt;&lt;P&gt;               JLL or L2 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               1.3.1.Check that billing document category (VBRK_VBTYP) is not &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                       available in the input structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                    1.3.1.1.	Find the preceding doc (VBFA-VBELV) with the preceding &lt;/P&gt;&lt;P&gt;                                document category(VBFA-VBTYP_V) M(invoice).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                    1.3.1.2.	If only one preceding document with category M found, then &lt;/P&gt;&lt;P&gt;                               pass VBRK as the  referenceprocedure(BKPF - AWTYP)  &lt;/P&gt;&lt;P&gt;                               and the billing (invoice) document number found above as &lt;/P&gt;&lt;P&gt;                                the reference key(BKPF &amp;#150;  AWKEY) to the input structure &lt;/P&gt;&lt;P&gt;                                and pass the posting date(BKPF &amp;#150; BUDAT) to the reporting &lt;/P&gt;&lt;P&gt;                                date (WWWRPT) to the output structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                     1.3.1.3 If there are multiple preceding document with category M&lt;/P&gt;&lt;P&gt;                                (invoice) are found,use the material number in the credit &lt;/P&gt;&lt;P&gt;                                memo to find the invoice with matched material number.If &lt;/P&gt;&lt;P&gt;                               the first invoice found with the matched material number will &lt;/P&gt;&lt;P&gt;                               be used to derive the reporting date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my requirement.Is it correct my logic.Any body give me suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;sudhakar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jul 2007 07:38:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-debug/m-p/2610017#M598617</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-29T07:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in debug ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-debug/m-p/2610018#M598618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I have tried ur coding.This code also working for first condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT CE0_M200-FKART eq r_fkart and NOT CE0_M200-fkart is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CE0_M200-WWRPT = CE0_M200-BUDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But second condition  ElseiF CE0_M200-FKART IN r_fkart is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the document type(FKART) of the input structure is not empty and contains any one the  following document type  &amp;#147;B1, B1E, B2, B2E, B3, B3E, B4, BK1, BK3,  FXG,G2, G2S, JGL, RE, VLG2, BM1, BM3, FXL, JLL or L2 .&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-sudhakar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jul 2007 08:19:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-debug/m-p/2610018#M598618</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-29T08:19:42Z</dc:date>
    </item>
  </channel>
</rss>

