Sunday, February 27, 2011

Electronic Invoicing to remove the & and $ symbols in idoc message

 move t100-text to text+len.
   move text to akt_message.
   BUFFER = T100-TEXT.
*if first &1/&2/&3/&4 or. $1/$2/$3/$4 replace
   IF T100-TEXT CA '$1'.
     REPLACE '$1' WITH INT_EDIDS-STAPA1 INTO BUFFER.
   ENDIF.
   IF T100-TEXT CA '$2'.
     REPLACE '$2' WITH INT_EDIDS-STAPA2 INTO BUFFER.
   ENDIF.
   IF T100-TEXT CA '$3'.
     REPLACE '$3' WITH INT_EDIDS-STAPA3 INTO BUFFER.
   ENDIF.
   IF T100-TEXT CA '$4'.
     REPLACE '$4' WITH INT_EDIDS-STAPA4 INTO BUFFER.
   ENDIF.
   IF T100-TEXT CA '&1'.
     REPLACE '&1' WITH INT_EDIDS-STAPA1 INTO BUFFER.
   ENDIF.
   IF T100-TEXT CA '&2'.
     REPLACE '&2' WITH INT_EDIDS-STAPA2 INTO BUFFER.
   ENDIF.
   IF T100-TEXT CA '&3'.
     REPLACE '&3' WITH INT_EDIDS-STAPA3 INTO BUFFER.
   ENDIF.
   IF T100-TEXT CA '&4'.
              REPLACE '&4' WITH INT_EDIDS-STAPA4 INTO BUFFER.
   ENDIF.
   IF T100-TEXT CA '$'.
    REPLACE '$' WITH INT_EDIDS-STAPA1 INTO BUFFER.
    REPLACE '$' WITH INT_EDIDS-STAPA2 INTO BUFFER.
    REPLACE '$' WITH INT_EDIDS-STAPA3 INTO BUFFER.
    REPLACE '$' WITH INT_EDIDS-STAPA4 INTO BUFFER.
   ENDIF.
   IF T100-TEXT CA '&'.
    REPLACE '&' WITH INT_EDIDS-STAPA1 INTO BUFFER.
    REPLACE '&' WITH INT_EDIDS-STAPA2 INTO BUFFER.
    REPLACE '&' WITH INT_EDIDS-STAPA3 INTO BUFFER.
    REPLACE '&' WITH INT_EDIDS-STAPA4 INTO BUFFER.
   ENDIF.
   CONDENSE BUFFER.
  MOVE buffer to akt_message.
   
          exit.
     

No comments:

Post a Comment