2014年8月21日 星期四

Correction of SD Document Status

1472007 - Document status has to be corrected

2014年7月21日 星期一

2014年4月29日 星期二

How to read Report selection screen field values before PAI field transport

Function: DYNP_VALUES_READ

How to got the field value when you still in selection screen manipulating, example code as below:
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vbeln.
*--- Update P_VSTEL
  dyfields-fieldname 'P_VSTEL'.
  APPEND dyfields.
  CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
      dyname     sy-cprog
      dynumb     sy-dynnr
    TABLES
      dynpfields dyfields.
  READ TABLE dyfields INDEX 1.

  IF dyfields-fieldvalue IS INITIAL.
    MESSAGE i899 WITH 'Please enter Shipping Point first!'.
    EXIT.
  ELSE.
    CLEARgr_vstel,  gr_vstel[],
           gt_lipov,  gt_lipov[],
           gt_dn,     gt_dn[].
    gr_vstel-sign   'I'.
    gr_vstel-option 'EQ'.
    gr_vstel-low    dyfields-fieldvalue.
    APPEND gr_vstel.
  ENDIF.

2014年3月28日 星期五

[Link] Timezone changes best practices

How to check the timezone at different levels

  • Login to SAP system client  
  • Run the report from Tcode SA38   -> TZCUSTHELP
  • Run the report from Tcode SA38   -> RSDBTIME
  • Run this function module in SE37   -> TZ_SYSTEM_GET_TZONE
  • Run this report from Tocde SA38  -> TZONECHECK 

2013年7月3日 星期三

[Link] Foreign Currency Valuation - Resetting Posting on Basis of Valuation History

Foreign Currency Valuation - Resetting Posting on Basis of Valuation History

After postings have been made, you can reset them at a later point in time. For this, the program determines the relevant foreign currency items (line items) and foreign currency balances (accounts) as well as any corresponding valuation differences from the entries in the valuation history. In the case of foreign currency items, the system also creates a reset posting if the items were cleared before or on the specified valuation key date. It is not possible prior to enhancement pack 5 to reset posting, if the items were cleared before or on the specified valuation key date. This new functionality is only available via Enhancement pack 5.
http://wiki.sdn.sap.com/wiki/display/ERPFI/Foreign+Currency+Valuation++-+Resetting+Posting+on+Basis+of+Valuation+History

[Link] Foreign Currency Valuation in SAP ECC 6

Foreign Currency Valuation in SAP ECC 6

This is the process to translate and adjust foreign currency amount of monetary accounts to local amount by a current suitable exchange rate (standard exchange rate).
http://mssmart77-sapfico.blogspot.tw/2012/08/foreign-currency-valuation-in-sap-ecc-6.html

2013年2月4日 星期一

[Code] How to catching selection criteria

How to catching selection criteria

Example: 
  DATAselection_table LIKE rsparams OCCURS 0  WITH HEADER LINE.

  CLEAR selection_tableREFRESH selection_table.

* Get selection criteria
  CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'

[Code] How to reference whole itab by name

How to reference whole itab by name

Example: clearing all selection criteria
FORM screen_clearing_all .
  DATAselctab         LIKE rsscr    OCCURS 20 WITH HEADER LINE,
        itabname        TYPE c        LENGTH 30.

  FIELD-SYMBOLS<para> TYPE ANY,
                 <sele> TYPE ANY TABLE.

  CLEAR selctabREFRESH selctab.

* Get selection screen