Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP Code for generic datasource zVBSEGK in transformation

Former Member
0 Likes
1,068

Hi everybody,

i have load generic datasource zVBSEGK on BW. the datasource is based on table VBSEGK on R3

i have created a generic cube ZC_VBSEGK, this cube ZC_VBSEGK has field "net due date". Now i create a transformation between datasource

zVBSEGK and cube ZC_VBSEGK.

On the transformation i need to create a routine to calculate "net due date" based on the field:  ZTERM (term of payment)  and ZFBDT (Baseline Date for Due Date Calculation)

Could you please help me how to write the ABAP to calculate net due date?

i am new to ABAP, i have tried some code found in SCN but it doesn't work for me till now.

Thankyou very much!

1 ACCEPTED SOLUTION
Read only

sachin_yadav3
Active Participant
0 Likes
955

Hi you can Call FM  "DETERMINE_DUE_DATE" to get net due date.

Data  : lwa_faede type faede.

lwa_faede-koart = 'K' or 'D'. "Acct type

lwa_faede-ZFBDT = Base line data

lwa_faede-SHKZG = 'H' or 'S' ."Credit or Debit

lwa_faede-ZBD3T = payment term


  CALL FUNCTION 'DETERMINE_DUE_DATE'               

    EXPORTING

      i_faede = lwa_faede

    IMPORTING

      e_faede = lwa_faede

    EXCEPTIONS

      OTHERS  = 1.

Net Due date  = lwa_faede-netdt.

Regards

Sachin

Hi everybody,

i have load generic datasource zVBSEGK on BW. the datasource is based on table VBSEGK on R3

i have created a generic cube ZC_VBSEGK, this cube ZC_VBSEGK has field "net due date". Now i create a transformation between datasource

zVBSEGK and cube ZC_VBSEGK.

On the transformation i need to create a routine to calculate "net due date" based on the field:  ZTERM (term of payment)  and ZFBDT (Baseline Date for Due Date Calculation)

Could you please help me how to write the ABAP to calculate net due date?

i am new to ABAP, i have tried some code found in SCN but it doesn't work for me till now.

Thankyou very much!

3 REPLIES 3
Read only

sachin_yadav3
Active Participant
0 Likes
956

Hi you can Call FM  "DETERMINE_DUE_DATE" to get net due date.

Data  : lwa_faede type faede.

lwa_faede-koart = 'K' or 'D'. "Acct type

lwa_faede-ZFBDT = Base line data

lwa_faede-SHKZG = 'H' or 'S' ."Credit or Debit

lwa_faede-ZBD3T = payment term


  CALL FUNCTION 'DETERMINE_DUE_DATE'               

    EXPORTING

      i_faede = lwa_faede

    IMPORTING

      e_faede = lwa_faede

    EXCEPTIONS

      OTHERS  = 1.

Net Due date  = lwa_faede-netdt.

Regards

Sachin

Read only

0 Likes
955

Hi Sachin,

Thankyou very much for your help.

Could i ask you:

  • where should i write this Code: in routine, start routine or end routine?
  • The data for base line and payment term i should correct like this rights?

Data  : lwa_faede type faede.

lwa_faede-koart = 'K' or 'D'. "Acct type

lwa_faede-ZFBDT = SOURCE_FIELDS-ZFBDT

lwa_faede-SHKZG = 'H' or 'S' ."Credit or Debit

lwa_faede-ZBD3T = SOURCE_FIELDS-ZTERM


  CALL FUNCTION 'DETERMINE_DUE_DATE'               

    EXPORTING

      i_faede = lwa_faede

    IMPORTING

      e_faede = lwa_faede

    EXCEPTIONS

      OTHERS  = 1.

 

Net Due date  = lwa_faede-netdt.

Read only

0 Likes
955

I would suggest go for end routine.