Friday, May 18, 2012

CR's On An Object

The following Program Can be used to find the CR's on an object
attachment

Standard Text to Request


After done with the standard text from SO10, Execute the program RSTXTRAN from SE38.


After selecting the execute it. Then in the next select/ deselect the request that need to be inserted in the request and press Enter.
These standard texts are transferred to the customizing request which can be used for transportation




Wednesday, January 11, 2012

Transaction code For SAP Query


Transaction Code for Table Maintenance
1. After creating table maintenance
2. GOTO SE93 -> <tcode>
3.popup appear. Select radio button -5(Transaction with Parameters)

Transaction code For SAP TABLE MAINTENANCE Generator

Transaction Code for Table Maintenance
1. After creating table maintenance
2. GOTO SE93 -> <tcode>
3.popup appear. Select radio button -5(Transaction with Parameters)





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.
     

To calculate the time difference

FORM calculate_time_diff_in_sec USING before_date LIKE sy-datum
                                      before_time LIKE sy-uzeit
                                      now_date    LIKE sy-datum
                                      now_time    LIKE sy-uzeit
                                      time_diff   TYPE i.
  DATA: delta_date TYPE i,
        delta_time TYPE i.

  delta_date = now_date - before_date.
  delta_time = now_time - before_time.

  IF delta_date < 0.                   " irregular situation
    time_diff = 0.
  ELSEIF delta_date > 2000.            " avoid overflow
    time_diff = 0.
  ELSE.
    time_diff = delta_date * 86400 + delta_time.
    IF time_diff < 0.                  " irregular situation
      time_diff = 0.
    ENDIF.
  ENDIF.
ENDFORM.                               " CALCULATE_TIME_DIFF_IN_SEC