‎2007 Jul 03 8:25 PM
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.
‎2007 Jul 03 9:32 PM
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
‎2007 Jul 03 8:38 PM
Hi,
Please try structure XVBDKR instead.
E1EDP02-BELNR = XVBDKR-BELNR.
E1EDP02-DATUM = XVBDKR-LFDAT.
Regards,
Ferry Lianto
‎2007 Jul 03 8:53 PM
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.
‎2007 Jul 03 8:44 PM
‎2007 Jul 03 8:54 PM
‎2007 Jul 03 9:03 PM
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
‎2007 Jul 03 9:19 PM
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.
‎2007 Jul 03 9:23 PM
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.
‎2007 Jul 03 9:32 PM
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
‎2007 Jul 04 10:35 AM
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.
‎2007 Jul 04 11:13 AM
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.
‎2007 Jul 07 5:59 PM
maybe there are some similar FMs to 'RV_BILLING_PRINT_VIEW' ?
because this one still does not fills the two missing fields....
M.
‎2007 Jul 08 9:02 PM
‎2007 Jul 08 9:27 PM
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