11-04-2009 9:11 PM
hi,
I am looking FM which gives billing doc no based on print doc no or vice versa.
Thanks,
Sonar
11-05-2009 12:47 PM
Hey Sonar ... FM's ISU_DB_ERCHC_SELECT_BILL and ISU_DB_ERCHC_SELECT_OPBEL will do the trick .... Joe
11-05-2009 12:47 PM
Hey Sonar ... FM's ISU_DB_ERCHC_SELECT_BILL and ISU_DB_ERCHC_SELECT_OPBEL will do the trick .... Joe
11-06-2009 3:38 AM
Thanks Joe,
I need Fm , input is belnr( Billing doc) and output should be printdocumnet.
Thanks,
Sonar
11-06-2009 8:10 AM
Hello Sonar,
Key o the solution is the DBERDLB table that holds both the print document and billing document number. IMHO there is no standard function module available that does the requested trick. I think that you will need to develop a FM by yourself.
Please mind the 'forward' relationship of a billing document with a print document. One print document may be related to more than one billing document.
Kind regards,
Fritz
11-06-2009 12:56 PM
Hey Sonar ... As Fritz indicates, table DBERDLB definitely gives those relationships (as well as history say the invoice was reversed). If you only need the current information ... for example billing document 101 was on invoice 201 and it's reversed. Now billing document 101 is on invoice 202. Table ERCHC will give you the 101 to 202 relationship.
Pass FM ISU_DB_ERCHC_SELECT_BILL passing x_belnr = 101 and you'll receive table t_erchc with field opbel being 202.
I usually do a straight select but the FM should work fine.
Regards, Joe