Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9129

Re: Subroutine in sapscript for net due date

$
0
0

Hi Cholen,

 

I believe your lv_laufd is a 10 character field in format MM/DD/YYY or DD/MM/YYYY. You should move that data to a 8 character variable (say lv_date) in YYYYDDMM format.

 

Please try this conversion

 

    CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'

      EXPORTING

        date_external            = lv_laufd

      IMPORTING

        date_internal            = lv_date

      EXCEPTIONS

        date_external_is_invalid = 1

        OTHERS                   = 2.

 

Check in debug, you should get lv_date in YYYYMMDD.

 

If you still do not get data after lv_date eq YYYYMMDD, check your LIFNR and KUNNR. They should be 10 charaters with leading zeroes if not 10 .

 

If needed use the conversion for lv_lifnr and lv_kunnr.

 

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

      EXPORTING

        date_external            = lv_lifnr

      IMPORTING

        date_internal            = lv_lifnr.

 

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

      EXPORTING

        date_external            =  lv_kunnr

      IMPORTING

        date_internal            =  lv_kunnr.

 

Cheers,

Raju.


Viewing all articles
Browse latest Browse all 9129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>