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

problem with populating E1EDP02

Former Member
0 Likes
2,278

Hi!

I try to populate E1EDP02 this way:

E1EDP02-BELNR = I_VBDKR-BELNR.

E1EDP02-DATUM = I_VBDKR-LFDAT.

but these 2 fields of I_VBDKR are empty while debugging, what are the possible reasons?

My case is like this: functional guy has manually added a few additional lines to segments of the invoice list Idoc and it is a sample for me how invoice list Idoc should look like when creating it with running program RSNAST00.

I try to test it with debuging program RSNAST00 and using a sample Idoc. If to be more precise, I try to debug only user exit ZXEDFU02. All the segments are populated ok, but not E1EDP02, because two main fields of I_VBDKR are empty ...

Any ideas?

Will reward,

Mindaugas.

1 ACCEPTED SOLUTION
Read only

ferry_lianto
Active Contributor
0 Likes
1,957

Hi,

Sorry ... I gave wrong FM.

Try this FM RV_BILLING_PRINT_VIEW instead of RV_BILLING_REFERENCES.


  ...

  IF NAST-OBJKY+10(6) NE SPACE.
    VBCO3-VBELN = NAST-OBJKY+16(10).
  ELSE.
    VBCO3-VBELN = NAST-OBJKY.
  ENDIF.
                                                                                VBCO3-MANDT = SY-MANDT.
  VBCO3-SPRAS = NAST-SPRAS.
  VBCO3-KUNDE = NAST-PARNR.
  VBCO3-PARVW = NAST-PARVW.
                                                                          
  CALL FUNCTION 'RV_BILLING_PRINT_VIEW'
       EXPORTING
            COMWA = VBCO3
       IMPORTING
            KOPF  = VBDKR
       TABLES
            POS   = TVBDPR.

...

Regards,

Ferry Lianto

13 REPLIES 13
Read only

ferry_lianto
Active Contributor
0 Likes
1,957

Hi,

Please try structure XVBDKR instead.


E1EDP02-BELNR = XVBDKR-BELNR.
E1EDP02-DATUM = XVBDKR-LFDAT.

Regards,

Ferry Lianto

Read only

0 Likes
1,957

I pass xvbdkr as a parameter to FM that populates E1EDP02 and this FM receives xvbdkr as I_VBDKR. So I_VBDKR is a clone of xvbdkr.

Any ideas?

M.

Read only

Former Member
0 Likes
1,957

Please close this , if resolved.

In this user exit you have xvbdkr sructure as one of the import parameters. See if that has the values. What is I_VBDKR? Is that an internal table you create?

Read only

0 Likes
1,957

see above please.

M.

Read only

ferry_lianto
Active Contributor
0 Likes
1,957

Hi,

Why do you need/build internal table I_VBDKR where you can use directly export parameter XVBDKR? Any specific reason.

Did you see any value in these field XVBDKR-BELNR and XVBDKR-LFDAT while debugging? If both values are empty perhaps you can try to use FM RV_BILLING_REFERENCES with passing the invoice number. This FM will return information same as structure VBDKR.

Regards,

Ferry Lianto

Read only

0 Likes
1,957

code with I_VBDKR was written long before me, I just try to modify it, so can not exclude using I_VBDKR.

XVBDKR-BELNR and XVBDKR-LFDAT are empty while debugging, so I will try to use RV_BILLING_REFERENCES.

M.

Read only

0 Likes
1,957

Google gives nothing about RV_BILLING_REFERENCES, SDN as well

Do we have any info about parametres of this FM?

CALL FUNCTION 'RV_BILLING_REFERENCES'

EXPORTING

FAKTURA =

TABLES

POS =

CHANGING

KOPF = .

M.

Read only

ferry_lianto
Active Contributor
0 Likes
1,958

Hi,

Sorry ... I gave wrong FM.

Try this FM RV_BILLING_PRINT_VIEW instead of RV_BILLING_REFERENCES.


  ...

  IF NAST-OBJKY+10(6) NE SPACE.
    VBCO3-VBELN = NAST-OBJKY+16(10).
  ELSE.
    VBCO3-VBELN = NAST-OBJKY.
  ENDIF.
                                                                                VBCO3-MANDT = SY-MANDT.
  VBCO3-SPRAS = NAST-SPRAS.
  VBCO3-KUNDE = NAST-PARNR.
  VBCO3-PARVW = NAST-PARVW.
                                                                          
  CALL FUNCTION 'RV_BILLING_PRINT_VIEW'
       EXPORTING
            COMWA = VBCO3
       IMPORTING
            KOPF  = VBDKR
       TABLES
            POS   = TVBDPR.

...

Regards,

Ferry Lianto

Read only

0 Likes
1,957

In fact 'RV_BILLING_PRINT_VIEW' does not fills two fields:

VBDKR-BELNR.

VBDKR-LFDAT.

other fields like VBDKR-VBELN. are populated with no problem, very strange... any ideas?

M.

Read only

0 Likes
1,957

here is my code, hope it helps:

VBCO3-VBELN = I_VBDKR-VBELN.

VBCO3-MANDT = SY-MANDT.

VBCO3-SPRAS = I_VBDKR-SPRAS.

CALL FUNCTION 'RV_BILLING_PRINT_VIEW'

EXPORTING

COMWA = VBCO3

IMPORTING

KOPF = IT_VBDKR

TABLES

POS = TVBDPR.

CHECK sy-subrc = 0.

E1EDP02-BELNR = IT_VBDKR-BELNR.

E1EDP02-DATUM = IT_VBDKR-LFDAT.

Little explanation:

IT_VBDKR is empty structure of VBDKR.

TVBDPR is empty structure of VBDPR.

I_VBDKR is clone of XVBDKR.

M.

Read only

0 Likes
1,957

maybe there are some similar FMs to 'RV_BILLING_PRINT_VIEW' ?

because this one still does not fills the two missing fields....

M.

Read only

0 Likes
1,957

any ideas?

M.

Read only

0 Likes
1,957

Check with FM : RV_BILLING_REFERENCES

if not then write a select query after FM RV_BILLING_PRINT_VIEW,

if sy-subrc eq 0.

populates values to segemnts

else.

select query bkpf with compareing billing document

move values to segment

endif.

Thanks

Seshu