2020年7月21日星期二

abap CO statement issues

Suppose Sy-subrc <> 0.
IF Stra CO strB .
ENDIF.
IF SY-SUBRC <> 0.   ------> sy-subrc is always none zero value.
ENDIF.


For example the Function of Conversion_Exit_IDate_Input

 DATAH_SONDERZEICHEN(23TYPE C
*          VALUE '0123456789', ".,*+-_/"§$%& ',                   "#EC
           VALUE '0123456789.,*+-_/"§$%& ',
        H_OFFSET            LIKE SY-FDPOS,
        H_DATUM_INPUT(50)   TYPE C,
        H_DATUM_OUTPUT      LIKE SY-DATUM.

  FIELD-SYMBOLS<MONAT>.

* SPACE-Eingabe wird nicht konvertiert

  IF INPUT SPACE.
    OUTPUT INPUT.
    EXIT.
  ENDIF.

* Überprüfen, ob das externe Datum keine Buchstaben enthält

  H_DATUM_INPUT INPUT.              <--------suppose sy-subrc <> 0 here.

  IF H_DATUM_INPUT CO H_SONDERZEICHEN. <--------H_DATUM_INPUT CO H_SONDERZEICHEN is TRUE
  ENDIF.

  IF SY-SUBRC 0.                     <-------sy-subrc can't be 0 here

    IF SY-FDPOS NE 50.

      H_OFFSET SY-FDPOS.
      ASSIGN H_DATUM_INPUT+H_OFFSET(3TO <MONAT>.

* Füllen der internen Tabelle mit festen Monatsbezeichungen in Englich

      IF H_MONAT_BUFFER NE SPACE.
        PERFORM FILL_H_MONAT_TAB.
        H_MONAT_BUFFER SPACE.
      ENDIF.

* Füllen des Puffers, falls der Puffer noch initial ist

      IF BUFFER_CONTROL NE SPACE.
        IF SY-LANGU NE H_LANGU_SAVE
           OR H_COUNTER EQ 0.
          H_LANGU_SAVE SY-LANGU.
          PERFORM FILL_BUFFER.
        ENDIF.
      ENDIF.

      IF BUFFER_CONTROL 'X'.

        LOOP AT T247_TAB WHERE KTX <MONAT>.
          REPLACE <MONAT> WITH T247_TAB-MNR INTO <MONAT>.
          CONDENSE H_DATUM_INPUT NO-GAPS.
        ENDLOOP.

        IF SY-SUBRC NE 0.
          MESSAGE S651 WITH <MONAT> SY-LANGU.
* Monat & ist in der Sprache & nicht angelegt
        ENDIF.

      ELSE.

        CLEAR H_T247_TAB.
        REFRESH H_T247_TAB.

        SELECT FROM T247 WHERE SPRAS SY-LANGU.
          H_T247_TAB T247.
          APPEND H_T247_TAB.
        ENDSELECT.

        LOOP AT H_T247_TAB WHERE KTX <MONAT>.
          REPLACE <MONAT> WITH H_T247_TAB-MNR INTO <MONAT>.
          CONDENSE H_DATUM_INPUT NO-GAPS.
        ENDLOOP.

        IF SY-SUBRC NE 0.
          MESSAGE S651 WITH <MONAT> SY-LANGU.
* Monat & ist in der Sprache & nicht angelegt
        ENDIF.

      ENDIF.

    ENDIF.

    CALL FUNCTION 'CONVERT_DATE_INPUT'
         EXPORTING
              INPUT                     H_DATUM_INPUT
              PLAUSIBILITY_CHECK        'X'
         IMPORTING
              OUTPUT                    H_DATUM_OUTPUT
         EXCEPTIONS
*             PLAUSIBILITY_CHECK_FAILED = 02
              WRONG_FORMAT_IN_INPUT     01.

    IF SY-SUBRC <> 0.
      OUTPUT SPACE.
      MESSAGE S885.
*   Das Datum hat ein ungültiges Format
    ELSE.
      OUTPUT H_DATUM_OUTPUT.
    ENDIF.

  ELSE.
    OUTPUT SPACE.
    MESSAGE S885.
*   Das Datum hat ein ungültiges Format

  ENDIF.

ENDFUNCTION.





SE93 table

TSTC (For example Programe name)
TSTCP (For example sm30)

2020年7月20日星期一

Key Combination of VK11

VK11 :Input MSWT (For example)

Spro:Sales and Distribution-->Basic Functions-->Taxes
1.Define Tax Relevancy of Master Records.

Key combination:


1. IMG - Sales and Distribution -> Basic Functions -> Pricing Control -> Define Condition Tables -> Create condition tables  V/05



2. IMG - Sales and Distribution -> Basic Functions -> Pricing Control -> Define Condition Tables -> Defince Access Sequences -> Maintain Access Sequences   V/07  (Data will be stored in Table A008,A010,A020,KONP when
VK11 save. See Image below )

3.IMG - Sales and Distribution -> Basic Functions -> Pricing Control -> Define Condition Types -> Maintain Condition Types  V/06 (Detail ,Fill Access Seq. of Step 2.)


For example:
VK11  MWST

(IMG - Sales and Distribution -> Basic Functions -> Pricing Control -> Define Condition Tables -> Defince Access Sequences -> Optimize accesses) 


Define Tax code:
FTXP 

Customer Characteristic

  Characteristic Descriptions are stored in the table - CABNT - Language - SPRAS - Characteristic description - ATBEZ Characteristic Values ...