Dunning letter based on Bill-to-party
Hi,
We have a custom smartform for Dunning letter which is a copy of a standard one.It is being triggered by BTE.
We have an incoming structure 'mhnd' which is populated based on sold to party and picks up all the outstanding documents pertaining to it.The dunning letter is issued to the sold to party customer.
The function module (FI_PRINT_DUNNING_NOTICE_SMARTF)trigggered by the event has mhnd already populated and is passed in the tables parameter.
Now the requirement is to pick the data based on bill to party and issue it to that customer.
How can we change the data in mhnd based on bill to party?
Replies appreciated.
Regards,
Blessy
Hi
You don't need to change the print because sold to party and bill to party are both customer for FI, so u need only to know the right customer code.
Max
Similar Messages
-
Export Tax(Vat) based on Bill to party
Hi
I have a very peculiar sutuation, in normal scenario tax and prices are determined based on Ship-To-Party country and plant, however, client expect Export Tax to be calculated based Bill to party country. Need suggesttion, how to address this query.
Could you please suggest. Points will be rewarded to helpful answers.
Regards
KalpeshHi Kalpesh
I think you need to change your access sequence of MWST.
Via transaction code V/07.
You need to change the destination country (which is ship to country) into sold to party via field catalog. But we do not advise this to clients, because you are then changing the standard SAP logic.
If the client really insists, then you need to make a new pricing procedure like MWST ie ZMWST with the necessary changes/settings but of course this a lot work again.
Hope this helps, I would appreciate if you could reward if helpful
kr
hakan -
Dunning Reminder to Bill to Party or Payer?
Hi,
Is generally dunning reminder send to bill to party or Payer?
Please clarify.
Regards
KaranHi,
Dunning letters are sent to the parties to which the respective dunning procedure is assigned. If the outstanding balces are existing in both the parties and the conditions given in the dunning procedure are satisfied, irrespectively dunning letters will be generated.
Hence dunning letter reminders are sent to the parties to which the respective dunning procedure is assigned.
Hope this will clarify your doubt.
Regards,
Vijay -
FI Dunning Letter: Requirement to get Sales Organisation of the letter
Hi folks,
I would like to know how to get the Sales Organisation of the dunning letter. Basically the dunning is performed from transaction f150 and the company code is the factor for deciding the texts to be printed on it. Now I have a requirement where I have to print a few texts on the dunning letter based on the Sales Organization.
Can you please help me identify from where I'll get the Sales Org.
Thanks in advance.
RahulHi
You don't need to change the print because sold to party and bill to party are both customer for FI, so u need only to know the right customer code.
Max -
Dunning Letter as Crystal Report: What tables? (SAP B1 9.0)
Dear Experts,
I am being asked to revise the Dunning Letters for our clients. The existing PLDs for each Dunning Letter shows most data fields as system variables. The existing Crystal Report for Dunning Letter 1 is a conversion from the PLD and doesn't show table information for most of the report's main items. There are tables in the report but they are standard ones (OADM, OADP, OCRD, OHEM, OSLP). It also includes a "table" called "PLD__ITEMS" which has all the PLD system variables and no B1 table or field/column information.
As I'm just now starting to work with dunning letters, I see that I can't even run this report in Crystal. The PLD__Items datasource prompts me for a file path and class name. Any ideas what one enters here to run the report outside of B1 (from the Crystal report designer)?
The main focus of my question is: Has anyone created a Crystal Report to replicate the Dunning Letter and if so, what tables are involved and how are they connected? If I can create a Dunning Letter entirely in Crystal, I can replicate it across all clients and get the correct fields/columns of data the clients want. The inclusion of the PLD__Items apparently limits my ability to test the results. I would prefer to avoid the PLD limitations.
Thanks for any assistance.Thank you Nagarajan. I have a dunning letter created in Crystal Reports for our client. It is fairly limited in scope, it just has the customer name and address, invoice numbers and dates, amounts due and the text they wanted in it.
I can import it into B1 9.0 and set it as the default for Dunning Letter #1 and it runs, but unlike other formats where there is a DocEntry and/or ObjectID and a ?DocKey@ or ?ObjectId@ parameter, how do I limit the report to just one customer? Typical document layouts run for the document that's on the screen. In the dunning process, the report runs once for every customer when the Dunning Letter Method is set to "One Letter per BP". I have to limit the report to one customer at a time. Right now, each dunning letter based on the Crystal report is identical and it contains all the data for every customer.
So, does anyone have any ideas for what selection criteria needs to be included in the Crystal report to have it select just one customer from the dunning wizard tables? Thanks.
Michael
Edit: I created a ?WizardID@ parameter and a ?CardCode@ parameter to limit the report to a single dunning wizard event and a single customer. While it works fine in Crystal itself, it doesn't work in B1 at all. I had thought that by limiting the report in this way, it would only create dunning letters for a single customer. -
How can the dunning letter shows O/S amt and corresponding aging bucket?
Hi,
I am going to implement the dunning letter setup in R12. Our user request to have the dunnng letter layout which should show all regular dunning details but also the aging info of the outstanding invoices, i.e. which aging bucket the outstanding amount will be shown. Anybody have idea and help? Thanks a lot.
EdmondThank you Nagarajan. I have a dunning letter created in Crystal Reports for our client. It is fairly limited in scope, it just has the customer name and address, invoice numbers and dates, amounts due and the text they wanted in it.
I can import it into B1 9.0 and set it as the default for Dunning Letter #1 and it runs, but unlike other formats where there is a DocEntry and/or ObjectID and a ?DocKey@ or ?ObjectId@ parameter, how do I limit the report to just one customer? Typical document layouts run for the document that's on the screen. In the dunning process, the report runs once for every customer when the Dunning Letter Method is set to "One Letter per BP". I have to limit the report to one customer at a time. Right now, each dunning letter based on the Crystal report is identical and it contains all the data for every customer.
So, does anyone have any ideas for what selection criteria needs to be included in the Crystal report to have it select just one customer from the dunning wizard tables? Thanks.
Michael
Edit: I created a ?WizardID@ parameter and a ?CardCode@ parameter to limit the report to a single dunning wizard event and a single customer. While it works fine in Crystal itself, it doesn't work in B1 at all. I had thought that by limiting the report in this way, it would only create dunning letters for a single customer. -
Tax Determination Bases on Bill to Party and Ship to Party
Hi Guru ,
I have a requirement Tax should be determined based on Bill to Party and Ship to Party.
If Bill to and Ship to are Overseas Customers then '0' TAX.
For all remaining Customers 7 % Tax
Could you please advice
ThanksHello,
Define two ACCESS SEQUENCE with the combination of Region code/Country key
Define the two TAX CONDITION types and assign the Access sequence one for each scenario
In OVK1 assign the Country key and TAX CONDITION and in OVK3 assign the tax category as 0 for the Overseas customer and 1 for Domestic customer
Then in VK11 maintain the condition records as 0% for Overseas customers and 7% for the Domestic customers.
Regards,
santosh -
Billing Due List based on Ship to Party
Hi,
I have a scenario where in I have multiple ship to parties in a single sales order . So there are different deliveries for all the different ship to parties (i.e Delivery Split). But I need to process the Billing due List based on the Ship to party. The Bill to party and the Payer is same for all the ship to parties. Let me have an example.
Let the Sold to party -
111
Bill to Party -
111
Payer -
111
Ship to Party 1 -- 222
Ship to Party 2 -- 333
Sales order --- 99999 has 10 line items, 5 each going to each ship to party. Now I am having Multiple deliveries .
del 1-> 44444 (Del NO)--> 222
del 1-> 44445 (Del NO)--> 222
del 1-> 44446 (Del NO)--> 222
del 1-> 44447 (Del NO)--> 333
del 1-> 44448 (Del NO)--> 333
del 1-> 44449 (Del NO)--> 333
Now I want a single invoice for del 44447,44448,44449 and one more Single invoice for del 44444,44445,44446.
So I need to have a Billing due list based on the Ship to Party. Please provide me if any solutions and also let me know if I am missing anything in the Standard SAP to achieve this.
Thankyou,
Rakesh Tummala.Hi
USEREXIT_FILL_VBRK_VBRP will not work since it is the billing due index (VKDFS) that you want to add ship to ID as the sort criterion. The proper user exit are actually:
- USEREXIT_VKDFS_SORTKRI_SALES for order related billing
- USEREXIT_VKDFS_SORTKRI_DEL for delivery related billing
they are in include module V05IEXIT.
For delivery related billing it is a one line code as below
VKDFS-SORTKRI = LLIKP-KUNNR
Order related billing is a little more complicated because you can have ship at both header and item level. If you need this as well post a follow up
Once you have this done, then you can use the sort criterion field in VF04 to do ship to selection for you -
Sold to party based on Ship to party or Bill to party
Hi Everybody,
Can we able to find the sold to party based on the ship to party or the bill to party?
Thanks,
Srinivasan.KHi,
When you give the sold to party number and the partner function you need to get whether it is SH or BP then the output will bring out all the assigned bill to's and ship to's.
But my requirement is the input should be the SH or BP and it should bring out the sold to party assigned to ship to or Bill to.
Thanks,
Srinivasan.K -
Hi Friends,
I want to display Bill-To party of a sales order that is displayed under Partners tab of VA03. The same Bill-To party I found in KNVP table - KUNN2 field. I am selecting KUNN2 field based on KUNNR, VKORG in sales order and PARVW = 'RE'. But for few sales orders, the KUNN2 field in KNVP and the Bill-To party appearing in Sales order (VA03) are different. Please let me know why there are different values at two places.
Thanks and Regards,
Netreytry using table vbpa..use parvw = 'RE'..
SELECT posnr from vbpa into zposnr WHERE vbeln = zvbeln.
select kunnr from vbpa into zkunnr where parvw = 'RE' and vbeln = zvbeln and posnr = zposnr.
endselect.
endselect.
plz reward points if dis helps
Message was edited by:
abapuser -
Disabling the field 'Bill-to party' in sales order screen
Hi friends,
I need to disable following fields in the partner functions tab of sales order ,while creating/changing a sales order,since they will be automatically populated and user should not be able to modify.
1.Bill-to party.
2.Payer.
I have tried with user exit MV45AFZZ,but program control is not coming there regarding PARTNERS tab,for diabling the screen.
Can you give me some hints like,any other EXIT or BADI exists for writing the code for this?
Thanks & Regards
Seshagiri.Hi,
Your requirement is to identify the bill to based on ship to. if so do the following.
maintain the partner tab in ship to master record, here you assign the bill to party to whom you have to send the bill.
Now in partner determination procedure maintain the bill to source as ship to. In partner determination procedure you have all the options from where system has to look for the other partner functions.
In this processes system first checks with Sold to, finds out a ship to, now from ship to partner tab it automatically finds out the bill to in to the sales order.
Hope you understood, if not let me know.
Reward if it helps you.
Venkat Cheedalla -
Automatically Select Bill to Party in Sales Order
HI,
I'm trying to find if there is a way to have the bill-to-party selected automatically in a sales order based on the shipping address.
I have some customers with multiply Shipping addresses and the invoice is sent to different locations based on which facility is receiving the goods. Can someone please let me know how I can do this or point me in the the right direction of some documentation that could help me figure this out. I've been searching for hours and haven't really found anything useful.
Thank You.Hi,
Your requirement is to identify the bill to based on ship to. if so do the following.
maintain the partner tab in ship to master record, here you assign the bill to party to whom you have to send the bill.
Now in partner determination procedure maintain the bill to source as ship to. In partner determination procedure you have all the options from where system has to look for the other partner functions.
In this processes system first checks with Sold to, finds out a ship to, now from ship to partner tab it automatically finds out the bill to in to the sales order.
Hope you understood, if not let me know.
Reward if it helps you.
Venkat Cheedalla -
Dunning Letter Address printing
Hi
I have created a BP master for which invoice is created .In the invoice Bill to address is collected via Formated Search.
After creating the invoice i changed the Customer Address in the BP Master.While Printing the address for Dunning letter address is taken from the BP master instead of AR Invoice Document.
Is there any way to do this ?
Thanks
SukumarI have created a BP master for which invoice is created. In the invoice Bill to address is collected via Formatted Search.
In the Invoice bill to address they require department name and its head to appear in the Invoice for which we already provided Formatted Search. For the Next Invoice it will be for another Department. For this we will change the BP Master. Like that for 1 BP Master we would have many invoices with different departments and different heads. Dunning letter should pick the address from the AR Invoice document and not from the BP Master. It should go to the right department and its head.
Company Name and Address will be the same but departments and its heads will be different for each invoice
Is there any solution
Edited by: Rui Pereira on Jan 27, 2009 2:37 PM -
hi experts,
iam asked to modify one standard sapscript and respective print program of dunning letter , for fi module. for tcode f150. original object is displaying dunning letter output for each customer. when i copied the same object and tried to execute, output is nil. i activated each and every include program etc, but in vain. according to FI consultant they dont maintain application in NACE. so i dnt know how to interlink print program and sapscript, in the original print program form name is not mentioned, i dnt know how the output is displayed in the form of sapscript.
my requirement is as follows
The customer is sent the gentle reminder letter for the out standing balances to be received by them. When ever the dunning program is run based on the dunning procedure assigned in the customer master and the level in the customer master, F150 program should be able to print the dunning letter for the customer correspondence.
MY STANDARD PROGRAM IS FOLLOWS
REPORT RFMAHN20 MESSAGE-ID FM NO STANDARD PAGE HEADING.
declaration for dunning lists
INCLUDE RFMAHNXXTOP.
tables declaration
TABLES: T001.
declaration for independend forms
INCLUDE RFMAHNXXFORM.
declaration
DATA: BEGIN OF MHNK_ACC,
KOART LIKE MHNK-KOART,
BUKRS LIKE MHNK-BUKRS,
KUNNR LIKE MHNK-KUNNR,
LIFNR LIKE MHNK-LIFNR,
KONTO LIKE MHNK-KUNNR,
SELKEY LIKE SY-TABIX,
L_INCL LIKE F150V-L_INCL,
HSORT1(16) TYPE C,
HSORT2(16) TYPE C,
HSORT3(16) TYPE C,
HSORT4(16) TYPE C,
HSORT5(16) TYPE C,
END OF MHNK_ACC.
declaration
DATA: T_MHNK LIKE MHNK OCCURS 10 WITH HEADER LINE.
DATA T_MHNK_ACC LIKE standard table of MHNK_ACC
with key koart bukrs konto WITH HEADER LINE.
parameters & select options
SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: P_KOART FOR MHNK-KOART,
P_BUKRS FOR MHNK-BUKRS,
P_KUNNR FOR MHNK-KUNNR,
P_LIFNR FOR MHNK-LIFNR.
SELECTION-SCREEN END OF BLOCK 1.
INITIALIZATION.
H_REPID = SY-REPID.
H_ACTVT = '13'. "display dunning history
H_TABNAME_HEADER = 'MHNK_ACC'.
H_TABNAME_ITEM = 'MHNK_EXT'.
H_SET_PF_STATUS = 'SET_PF_STATUS'.
H_USER_COMMAND = 'USER_COMMAND_0001'.
H_VARIANT-REPORT = H_REPID.
H_VARIANT-LOG_GROUP = '0001'.
H_VARIANT-HANDLE = '0001'.
H_LAYOUT-DETAIL_POPUP = 'X'.
START-OF-SELECTION.
select the information from MHNK
SELECT * FROM MHNK INTO TABLE T_MHNK
WHERE KOART IN P_KOART AND
BUKRS IN P_BUKRS AND
KUNNR IN P_KUNNR AND
LIFNR IN P_LIFNR.
build the tables for the listviewer
PERFORM CREATE_TABLES TABLES T_MHNK T_MHNK_ACC T_MHNK_EXT.
END-OF-SELECTION.
fill the fieldcatalog
PERFORM FILL_FIELDCAT TABLES T_FIELDCAT
USING H_TABNAME_HEADER H_TABNAME_ITEM.
determine the keyinfo
PERFORM FILL_KEYINFO CHANGING H_KEYINFO.
register the list events
PERFORM REGISTER_EVENTS TABLES T_EVENTS.
Check if default-variant is existing (default or user-default )
h_variant-variant has to be empty for this check, otherwise it is
checked whether this variant is existing.
H_VARIANT-VARIANT = SPACE.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
I_SAVE = 'A'
CHANGING
CS_VARIANT = H_VARIANT
EXCEPTIONS
WRONG_INPUT = 1
NOT_FOUND = 2
PROGRAM_ERROR = 3
OTHERS = 4.
IF SY-SUBRC = 2.
default-variant not existing, therefor get variant 0
H_VARIANT-VARIANT = '0'.
ELSEIF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE 'S' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
display the list
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_CALLBACK_PROGRAM = H_REPID
I_CALLBACK_PF_STATUS_SET = H_SET_PF_STATUS
I_CALLBACK_USER_COMMAND = H_USER_COMMAND
IS_LAYOUT = H_LAYOUT
IT_FIELDCAT = T_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = t_sort[]
IT_FILTER =
IS_SEL_HIDE =
*-- i_screen_start_column = 5
*-- i_screen_start_line = 5
*-- i_screen_end_column = 80
*-- i_screen_end_line = 25
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT = H_VARIANT
IT_EVENTS = T_EVENTS[]
IT_EVENT_EXIT =
I_TABNAME_HEADER = H_TABNAME_HEADER
I_TABNAME_ITEM = H_TABNAME_ITEM
I_STRUCTURE_NAME_HEADER =
I_STRUCTURE_NAME_ITEM =
IS_KEYINFO = H_KEYINFO
IS_PRINT =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB_HEADER = T_MHNK_ACC
T_OUTTAB_ITEM = T_MHNK_EXT
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*& Form FILL_FIELDCAT
text
-->P_T_FIELDCAT text *
-->P_H_TABNAME_HEADER text *
-->P_H_TABNAME_ITEM text *
FORM FILL_FIELDCAT TABLES TI_FIELDCAT STRUCTURE T_FIELDCAT
USING I_HEADER TYPE SLIS_TABNAME
I_ITEM TYPE SLIS_TABNAME.
create the header fieldcat
PERFORM APPEND_SEL_FIELDS TABLES TI_FIELDCAT
USING I_HEADER.
CLEAR TI_FIELDCAT.
TI_FIELDCAT-TABNAME = I_HEADER.
TI_FIELDCAT-FIELDNAME = 'KOART'.
TI_FIELDCAT-SELTEXT_L = TEXT-052.
TI_FIELDCAT-SELTEXT_M = TEXT-052.
TI_FIELDCAT-SELTEXT_S = TEXT-052.
TI_FIELDCAT-REPTEXT_DDIC = TEXT-052.
TI_FIELDCAT-REF_FIELDNAME = 'KOART'.
TI_FIELDCAT-REF_TABNAME = 'MHNK'.
APPEND TI_FIELDCAT.
CLEAR TI_FIELDCAT.
TI_FIELDCAT-TABNAME = I_HEADER.
TI_FIELDCAT-FIELDNAME = 'BUKRS'.
TI_FIELDCAT-SELTEXT_L = TEXT-051.
TI_FIELDCAT-SELTEXT_M = TEXT-051.
TI_FIELDCAT-SELTEXT_S = TEXT-051.
TI_FIELDCAT-REPTEXT_DDIC = TEXT-051.
TI_FIELDCAT-REF_FIELDNAME = 'BUKRS'.
TI_FIELDCAT-REF_TABNAME = 'MHNK'.
APPEND TI_FIELDCAT.
CLEAR TI_FIELDCAT.
TI_FIELDCAT-TABNAME = I_HEADER.
TI_FIELDCAT-FIELDNAME = 'KONTO'.
TI_FIELDCAT-SELTEXT_L = TEXT-050.
TI_FIELDCAT-SELTEXT_M = TEXT-050.
TI_FIELDCAT-SELTEXT_S = TEXT-050.
TI_FIELDCAT-REPTEXT_DDIC = TEXT-050.
TI_FIELDCAT-REF_FIELDNAME = 'KONTO'.
TI_FIELDCAT-REF_TABNAME = 'F150V'.
APPEND TI_FIELDCAT.
CLEAR TI_FIELDCAT.
TI_FIELDCAT-TABNAME = I_HEADER.
TI_FIELDCAT-FIELDNAME = 'L_INCL'.
TI_FIELDCAT-SELTEXT_L = TEXT-041. " Kennz: Mahn. gedruckt
TI_FIELDCAT-REPTEXT_DDIC = 'L_INCL'.
TI_FIELDCAT-REF_FIELDNAME = 'L_INCL'.
TI_FIELDCAT-REF_TABNAME = 'F150V'.
APPEND TI_FIELDCAT.
clear ti_fieldcat.
ti_fieldcat-tabname = 'MHNK_EXT'.
ti_fieldcat-fieldname = 'COMP_CURR'.
ti_fieldcat-seltext_l = text-053.
ti_fieldcat-seltext_m = text-053.
ti_fieldcat-seltext_s = text-053.
ti_fieldcat-ref_fieldname = 'WAERS'.
ti_fieldcat-ref_tabname = 'MHNK'.
append ti_fieldcat.
perform append_sort_fields tables ti_fieldcat
using i_header h_sort_info 'H'.
create the item fieldcat
PERFORM APPEND_SEL_FIELDS TABLES TI_FIELDCAT
USING I_ITEM.
generate fieldcat
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = H_REPID
I_INTERNAL_TABNAME = I_ITEM
I_STRUCTURE_NAME = 'MHNK'
I_CLIENT_NEVER_DISPLAY = 'X'
i_inclname = 'RFMAHNXXTOP'
CHANGING
CT_FIELDCAT = TI_FIELDCAT[]
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
for amounts in company currency establish link to MHNK_EXT-COMP_CURR
so that summation in ALV is possible
loop at ti_fieldcat.
if ti_fieldcat-fieldname = 'SALHW' or
ti_fieldcat-fieldname = 'FAEHW' or
ti_fieldcat-fieldname = 'ZINHW' or
ti_fieldcat-fieldname = 'FAMSH' or
ti_fieldcat-fieldname = 'MHNGH'.
ti_fieldcat-cfieldname = 'COMP_CURR'.
ti_fieldcat-ctabname = 'MHNK_EXT'.
modify ti_fieldcat.
endif.
endloop.
CLEAR TI_FIELDCAT.
TI_FIELDCAT-TABNAME = I_ITEM.
TI_FIELDCAT-SELTEXT_L = TEXT-042. " 'Nur gedruckte Posten'.
ti_fieldcat-seltext_m = text-'Nur gedr. Posten'.
ti_fieldcat-seltext_s = 'Nur gedr. Post.'.
TI_FIELDCAT-FIELDNAME = 'L_INCL'.
TI_FIELDCAT-REPTEXT_DDIC = 'L_INCL'.
TI_FIELDCAT-REF_FIELDNAME = 'L_INCL'.
TI_FIELDCAT-REF_TABNAME = 'F150V'.
APPEND TI_FIELDCAT.
perform append_sort_fields tables ti_fieldcat
using i_item h_sort_info 'H'.
select the fields to be shown
PERFORM HIDE_ALL_FIELDS TABLES TI_FIELDCAT USING I_HEADER.
select the fields to be shown
PERFORM HIDE_ALL_FIELDS TABLES TI_FIELDCAT USING I_ITEM.
ENDFORM. " FILL_FIELDCAT
*& Form CREATE_TABLES
text
--> p1 text
<-- p2 text
FORM CREATE_TABLES TABLES TI_MHNK STRUCTURE MHNK
TI_MHNK_ACC STRUCTURE MHNK_ACC
TI_MHNK_EXT STRUCTURE MHNK_EXT.
data : begin of comp_curr,
bukrs like mhnk-bukrs,
waers like mhnk-waers,
end of comp_curr.
data bukrs_tab like comp_curr occurs 0 with header line.
sort the table
SORT TI_MHNK BY KOART BUKRS KUNNR LIFNR ASCENDING.
build t_mhnk_ext
LOOP AT TI_MHNK.
check authority
PERFORM CHECK_AUTHORITY USING '13' TI_MHNK-KOART TI_MHNK-BUKRS
CHANGING H_AUTHORITY_OK.
IF H_AUTHORITY_OK = SPACE.
CONTINUE.
ENDIF.
save wa
MHNK = TI_MHNK.
create item entry
MOVE-CORRESPONDING MHNK TO TI_MHNK_EXT.
IF TI_MHNK_EXT-KOART = 'D'.
TI_MHNK_EXT-KONTO = TI_MHNK_EXT-KUNNR.
ELSE.
TI_MHNK_EXT-KONTO = TI_MHNK_EXT-LIFNR.
ENDIF.
TI_MHNK_EXT-HSORT1 = <F1>.
TI_MHNK_EXT-HSORT1 = <F2>.
TI_MHNK_EXT-HSORT1 = <F3>.
TI_MHNK_EXT-HSORT1 = <F4>.
TI_MHNK_EXT-HSORT1 = <F5>.
check if item has been printed already
IF NOT TI_MHNK_EXT-PRNDT IS INITIAL.
TI_MHNK_EXT-L_INCL = 'X'.
ELSE.
TI_MHNK_EXT-L_INCL = SPACE.
endif.
read table bukrs_tab with key bukrs = ti_mhnk_ext-bukrs.
if sy-subrc <> 0.
select single * from t001 where bukrs = ti_mhnk_ext-bukrs.
if sy-subrc = 0.
bukrs_tab-waers = t001-waers.
bukrs_tab-bukrs = ti_mhnk_ext-bukrs.
append bukrs_tab.
endif.
endif.
ti_mhnk_ext-comp_curr = bukrs_tab-waers.
APPEND TI_MHNK_EXT.
create header entry
MOVE-CORRESPONDING MHNK TO TI_MHNK_ACC.
IF TI_MHNK_ACC-KOART = 'D'.
TI_MHNK_ACC-KONTO = TI_MHNK_ACC-KUNNR.
ELSE.
TI_MHNK_ACC-KONTO = TI_MHNK_ACC-LIFNR.
ENDIF.
COLLECT TI_MHNK_ACC.
ENDLOOP.
determine if account has at least one printed dunning
LOOP AT TI_MHNK_ACC.
READ TABLE TI_MHNK_EXT WITH KEY KOART = TI_MHNK_ACC-KOART
BUKRS = TI_MHNK_ACC-BUKRS
KUNNR = TI_MHNK_ACC-KUNNR
LIFNR = TI_MHNK_ACC-LIFNR
KONTO = TI_MHNK_ACC-KONTO
L_INCL = 'X'.
IF SY-SUBRC = 0.
TI_MHNK_ACC-L_INCL = 'X'.
MODIFY TI_MHNK_ACC.
ENDIF.
ENDLOOP.
ENDFORM. " CREATE_TABLES
*& Form FILL_KEYINFO
text
<--P_H_KEYINFO text *
FORM FILL_KEYINFO CHANGING E_KEYINFO TYPE SLIS_KEYINFO_ALV.
MOVE 'KOART' TO : E_KEYINFO-HEADER01,E_KEYINFO-ITEM01.
MOVE 'BUKRS' TO : E_KEYINFO-HEADER02,E_KEYINFO-ITEM02.
MOVE 'KONTO' TO : E_KEYINFO-HEADER03,E_KEYINFO-ITEM03.
ENDFORM. " FILL_KEYINFO
*& Form SET_PF_STATUS
text
-->P_RT_EXTAB text *
-->P_TYPE text *
-->P_SLIS_T_EXTAB text *
FORM SET_PF_STATUS USING I_EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'HIST_MAX' EXCLUDING I_EXTAB.
ENDFORM. " SET_PF_STATUS
*& Form USER_COMMAND_0001
text
--> p1 text
<-- p2 text
FORM USER_COMMAND_0001 USING I_UCOMM LIKE SY-UCOMM
I_SELFIELD TYPE SLIS_SELFIELD.
CASE I_UCOMM.
WHEN 'DISP'.
PERFORM COMMAND_DISP USING I_SELFIELD.
ENDCASE.
ENDFORM.
*& Form COMMAND_DISP
text
--> p1 text
<-- p2 text
FORM COMMAND_DISP CHANGING E_SELFIELD TYPE SLIS_SELFIELD.
declaration
DATA: TH_MHND LIKE MHND OCCURS 10 WITH HEADER LINE,
TH_MHNK LIKE MHNK OCCURS 1 WITH HEADER LINE.
determine the current line
IF E_SELFIELD-TABNAME = H_TABNAME_ITEM.
READ TABLE T_MHNK_EXT INDEX E_SELFIELD-TABINDEX.
MOVE-CORRESPONDING T_MHNK_EXT TO TH_MHNK.
APPEND TH_MHNK.
ELSE.
MESSAGE E481.
EXIT.
ENDIF.
determine the mhnd entries for the actual mhnk
SELECT * FROM MHND INTO TABLE TH_MHND
WHERE LAUFD = TH_MHNK-LAUFD
AND LAUFI = TH_MHNK-LAUFI
AND KOART = TH_MHNK-KOART
AND BUKRS = TH_MHNK-BUKRS
AND KUNNR = TH_MHNK-KUNNR
AND LIFNR = TH_MHNK-LIFNR
AND CPDKY = TH_MHNK-CPDKY
AND SKNRZE = TH_MHNK-SKNRZE
AND SMABER = TH_MHNK-SMABER
AND SMAHSK = TH_MHNK-SMAHSK.
change the dunning data
CALL FUNCTION 'EDIT_DUNNING_DATA'
EXPORTING
I_MHNK = TH_MHNK
I_XDISPLAY = 'X'
TABLES
T_MHND = TH_MHND
T_MHNK = TH_MHNK
EXCEPTIONS
OTHERS = 1.
ENDFORM. " COMMAND_DISP
*& Form REGISTER_EVENTS
text
-->P_T_EVENT text *
FORM REGISTER_EVENTS TABLES T_EVENT TYPE SLIS_T_EVENT.
determine the events
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 1
IMPORTING
ET_EVENTS = T_EVENT[]
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2.
set top of page form
READ TABLE T_EVENT WITH KEY NAME = SLIS_EV_TOP_OF_PAGE.
IF SY-SUBRC EQ 0.
T_EVENT-FORM = 'TOP_OF_PAGE'. MODIFY T_EVENT INDEX SY-TABIX.
ENDIF.
set top of list form
READ TABLE T_EVENT WITH KEY NAME = SLIS_EV_TOP_OF_LIST.
IF SY-SUBRC EQ 0.
T_EVENT-FORM = 'TOP_OF_LIST'. MODIFY T_EVENT INDEX SY-TABIX.
ENDIF.
set end of list
READ TABLE T_EVENT WITH KEY NAME = SLIS_EV_END_OF_LIST.
IF SY-SUBRC EQ 0.
T_EVENT-FORM = 'END_OF_LIST'. MODIFY T_EVENT INDEX SY-TABIX.
ENDIF.
ENDFORM. " REGISTER_EVENTS
FORM TOP_OF_PAGE *
FORM TOP_OF_PAGE.
PERFORM BATCH-HEADING(RSBTCHH0).
ENDFORM. " TOP_OF_PAGE
FORM TOP_OF_LIST *
FORM TOP_OF_LIST.
*- Standardseitenkopf fuellen -
MOVE '0' TO BHDGD-INIFL.
MOVE SY-LINSZ TO BHDGD-LINES.
MOVE SY-UNAME TO BHDGD-UNAME.
MOVE SY-REPID TO BHDGD-REPID.
CLEAR: LINE.
WRITE TEXT-040 TO BHDGD-LINE2.
ENDFORM.
FORM END_OF_LIST *
FORM END_OF_LIST.
WRITE: / TEXT-039.
ENDFORM
regards
maayaHi,
I copied your program and executed it. First of all, I dont think its a print program for any script. Its a plain ALV report program. I think you mis-understood the requirement or I totally lost the question.
Make sure you are changing the correct program.
Regards
Aneesh. -
Dunning letter -smartform - F150_DNN_SF
hi all,
am creating a smart form for dunning letter F150_DUNN_SF , we have three levels of dunning based on the past due days.
level 1 , level 2 and level 3 and each level has its own format for print output. so basically i need to trigger three smart forms for a customer.
I have created to three forms but functional team assigned it to the dunning level .
now my question is how these forms are triggered by dunning level and where should i do customization based on the dunning level in order to print the corresponding format the presumption that customer will always have three dunning levels of past due invoices.
example if there are 20 invoices past due.
10 Invoices- dunning level 1 ---trigger smartform 1
5 Invoices-dunning level 2 --trigger smartform 2
5 Invoices- dunning level 3-trigger smartform 3.
thanks
GOVIThe form trigger by dunning level is part of the dunning procedure configuration in the IMG. If I understand your question correctly though, it does not make sense for one customer to have multiple dunning levels. A customer has a single dunning level within a company. The customer may have various balance ages but only a single dunning level, which is assigned by the dunning program based on the dunning area.
Maybe you are looking for
-
Wacom tablet staying in one area on CS5
Hello. I am having a really annoying problem with Photoshop CS5. Whenever I use my tablet pen on photoshop, the cursor stays in the upper left corner of the monitor, instead of the entire screen. Even though this happens, when I am not on Photoshop,
-
HELP! How do I transfer songs from my computer's hard drive to my i-Pod?
HELP! How do I transfer songs from my computer's hard drive to my i-Pod? Apple i-Pod 30 GB video Windows XP Pro 1.25 GB RAM - PENTIUM 4 - 120 GB HD -
-
How do i download PS CS5 Extended to install on a new iMac
Just purchased a new imac. I had purchased PS CS5 Extended from Adobe directly. I do not have the original download and went to the site to find it and all I get is the app downloader fore CS 5.5. I just want to re-download CS 5 extended. Anyo
-
7.0 Killed My Powerbook G4
Since "receiving" the automatic download for iTunes 7.0 the experience on my Mac has gone from being a joy, to a living ****. Since installing 7.0 I can no longer. - Play audio on the web, except for .mov files - The only files that play on my comput
-
is there any way to only have the title on the first page and not every page?