Delete Document Flow
Hi experts,
I need to create a FM in order to delete a document flow on certain business transaction. For example: deleting an opportunity from a lead. However, it is not working and I wonder if the input parameters might be wrong.
Below is the coding. Any comments are welcome!
Line: -
CALL FUNCTION 'CRM_DOC_FLOW_MAINTAIN_OW'
EXPORTING
iv_header_guid = iv_lead_guid
iv_ref_guid = iv_lead_guid
iv_external_call = abap_true
CHANGING
ct_doc_links = lt_doc_link
ct_input_fields = lt_input_fields
EXCEPTIONS
error_occurred = 1
OTHERS = 2.
did it worked for you ??
I too looking on it .. it is okay when i check with FM: CRM_DOC_FLOW_DELETE_CHECK_EC, but finally when i run with FM:
CRM_DOC_FLOW_DELETE_EC, it is not working.
not deleting the docflow.
any idea
Thanks,
Mahesh
Similar Messages
-
Deleted outbound delivery doc displayed in document flow
Hello,
Deleted outbound delivery document is still displayed in document flow and its status is 'Archived'
I don't know why deleted document is seen and moreover I haven't ever seen such a status in document flow. For your reference, the delivery document is displayed in only VF02 or VF03 with its billing document, which is also cancelled. One more thing, its sales order is also deleted.
Thanks for your kind response in advance.Hi,
This is happening because invoice can only be cancelled and not deleted. While sales order and delivery can be deleted. So if you check the document flow of the cancelled invoice it will show the delivery number but with status as archived. If you try to display such documents you will get an error message 'Delivery xxx does not exist'.
If you delete a sales order and delivery which does not have an invoice this will not happen.
Regards,
Sajith. -
Deleted sales order remains in document flow
Hello!
The problem:
We had sales order with reference to a contract. We deleted the sales order (it doesn't appear in VBAK anymore), but, the sales order still appears in VBFA (if we see the document flow for the contract, the sales order still appears there as archived!!!)
I deleted the sales order in a regular way via VA02.
I heared that there is a function module or another solution to fix the document flow.
I also saw a solution for this kind of problem for delivery (SAP note 74513).
Please assist,
ThanksHi!
Thanks to Jelena!!!
As she wrote that in these cases OSS can solve the problem and it happens a lot, we opened an OSS and got an answer:
OSS answer:
when you delete an order the corresponding entry in VBFA is not
deleted. The system is not able to differ between archived and deleted
orders, so to ensure that the document flow is also showing archived
documents the entries in VBFA remain. This is also described in
attached note 390905. When you are sure which entries in VBFA can be
deleted you can use report SDVBFA00 to delete the entries.
What we need to do:
go to SE38 and run report SDVBFA00.
Sales document is a contract number (preceeding document)
"Delete" - put X or leave empty.
The logic is:
You put the preceeding document and leave the field "Delete" empty.
The program finds by himself all the sales orders (following documents) that are connected to this contract and are deleted.
You check that the system suggests to delete the correct sales orders
Run this report again, but this time put X in "Delete" field and the sales orders will be deleted.
Apparently there are several reports exist to solve VBFA problems SDVBFA00,SDVBFA01 etc.
Thanks! -
Document Flow for deleted |outbound delivery
Hi All,
I am facing with a very urgent issue. I hope somebody will be able to help.
Scenario:
I have a sales order. I have created outbound delivery with no picking and PGI done. By mistake one of the end user have deleted the outbound delivery. Now i want to find the sales order number of the deleted delivery. I have the deleted outbound delivery number.
Is there any way, I can look at the document flow or data in any table regarding this deleted delivery number?
This is an urgent issue. Please helpHi
Once the delivery is deleted the references you are looking for a cleared
(LIPS-VGBEL, VGPOS) go with the deletion and the document flow link in VBFA
is also deleted. As mentioned the record of the deletion and what happened to the delivery
should still be available in VL22 as mentioned.
When a sales document is relevant for delivery it is written to table VEPVG.
So when you deleted the delivery the entry for the affected sales order would have been
restored to the delivery due index. You will find it in there but no where else now at this
stage.
I hope this helps
Kind regards
Brian -
Sales document flow(vbfa) entries are deleted
Hi Guys,
I am facing a problem with VBFA table. Actually for some delivery i am able to get Sales order number from VBFA table but for some delivery there is no records exists in VBFA table. So just want to know is there any program or Funtion module which delete entries from VBFA table if not then is there any functional configuration which not allowed to enter data in VBFA table. In my system i searched for all the programs and function module but no luck.
I can saw the Sales document flow in VL03N but no entries in VBFA table.
thanks,
BaidyaHi Guys,
Thanks for the replies.
But this is true for some delivery there is no entries in VBFA table but entries are exist in LIKP and LIPS. We are using userexit in sales order program for creating delivery. The Function module which creates delivery inside the USER-EXIT is : BAPI_OUTB_DELIVERY_CREATE_SLS.
If anyone face this type of problem please reply..
Thanks,
Baidya -
Delete outbound delivery set status archived in document flow
hello!
when trying to cancel outbound delivery, the status of the document set to archived in the document flow.
when trying to access the document i recieved message that the document was canceled.
the status in the document flow should b canceld, instead of archived.
I know that its a bug in ECC6 , but i dont know how to fix it.
Please help?
Regards
YifatHi,
On initial screen system will not show status.and it is standard
Rather select sales order and click on STATUS OVERVIEW at item level you can able to see status of P.O
Purch. requisition - Purch.req. available
Purch.confirm.status - All schedLine confrm confirmed
Invoice recipt status - Complete invoice rpt Posted
Kapil -
Delivery document flow show as a Archived,
Dear Experts,
My some of delivery document show in document flow as a archived, I want to know, Why delivery document archived,
I also want to not list of archived delivery document,
Can anybody give me t.code for list of delivery document archived,
Regards:
HappyHi,
Are these delivery actually archived by archiving job? Is there any subsequent document after the delivery?
Technically, if an delivery doesn't exist in LIKP table, but it exist in VBFA table, it will show "archived" in document flow.
As of why the delivery doesn't exist in LIKP, there could be two possibilities:
- it's deleted by archiving job.
- for unknown reason, it's gone.
To know why it's gone, it's necessary to reproduce the issue. If you can reproduce, please raise a message to SAP support.
What you need to do:
- If this delivery is really archived by your archivng job, you should also archive the preceding sales document.
- If this delivery is not supposed to be archived, but misisng, you need ot delete this dummy entry from VBFA table, and then recreate delivery.
To get a list of this kind of archived document, there is no standard report or transaction to do that. You need to write your own report to do that. As mentioned above, technically, if delivery exist in VBFA but doesn't exist in LIKP, it will be displayed like that. You may selecting VBFA and LIKP tables to get your list.
Regards,
Harry -
Regarding invoice no. displaying in non-invoice no.list in document flow
Hi All,
I have 3 radio buttons. if i select 1st one only orders with invoice list should be displayed and for 2nd only orders without invoice list should be displayed and for the 3rd both should be displayed.
but here the problem was when i select the 2nd radiobutton and see the output it was showing all the orders without invoice no. but when i see the document flow for the first order it was showing invoice no. in DOCUMENT FLOW. but it was not displaying in the output.
So any one can help me in this issue, i am sending the select statements i have used,
Get the invoice numbers and the corresponding order numbers for the
date range specified on the selection screen.
SELECT vbrkvbeln vbrpposnr vbrp~matnr
vbrpaubel vbfaposnv
INTO CORRESPONDING FIELDS OF TABLE i_invoice_items FROM vbrk
INNER JOIN vbpa ON vbrkvbeln = vbpavbeln
INNER JOIN vbrp ON vbrkvbeln = vbrpvbeln
INNER JOIN vbfa ON vbrkvbeln = vbfavbeln AND
vbrpposnr = vbfaposnn AND
vbrpaubel = vbfavbelv
WHERE vbrk~fkdat BETWEEN s_fkdat-low AND s_fkdat-high AND
vbrk~bukrs IN s_bukrs AND
vbpa~parvw = 'WE' AND
vbpa~kunnr IN s_kunnr AND
vbrk~vkorg IN s_vkorg AND
vbrp~prodh IN s_prdha AND
vbrp~werks IN s_werks AND
vbfavbelv = vbrpaubel AND
vbfa~vbtyp_n = 'M' AND
vbfa~vbtyp_v = 'C'.
get all open orders i.e. orders that have not been invoiced - Start.
Step 1 - Get all invoiced orders.
SELECT vbfavbelv vbfaposnv
INTO CORRESPONDING FIELDS OF TABLE i_inv_ord_items
FROM vbfa
INNER JOIN vbpa ON vbfavbelv = vbpavbeln
INNER JOIN vbak ON vbfavbelv = vbakvbeln
INNER JOIN vbap ON vbfavbelv = vbapvbeln AND
vbfaposnv = vbapposnr
WHERE vbtyp_n = 'M' AND
vbtyp_v = 'C' AND
vbpa~parvw = 'WE' AND
vbpa~kunnr IN s_kunnr AND
vbak~vkorg IN s_vkorg AND
vbak~bukrs_vf IN s_bukrs AND
vbap~abgru = ' ' AND
vbap~werks IN s_werks AND
vbap~prodh IN s_prdha.
STEP 2 - Get all orders that have not been invoiced.
Step 2a) Get all orders that match the filters specified on the selection screen
SELECT vbakvbeln vbapposnr matnr
INTO CORRESPONDING FIELDS OF TABLE i_ord_items FROM vbak
INNER JOIN vbap ON vbakvbeln = vbapvbeln
INNER JOIN vbpa ON vbakvbeln = vbpavbeln
WHERE vbpa~parvw = 'WE' AND
vbpa~kunnr IN s_kunnr AND
vbak~vkorg IN s_vkorg AND
vbak~bukrs_vf IN s_bukrs AND
prodh IN s_prdha AND
werks IN s_werks AND
vbap~abgru = ' '.
SORT i_ord_items BY vbeln posnr.
Step 2b) Delete orders that have been invoiced by
deleting records found in Step 1
LOOP AT i_inv_ord_items INTO wa_inv_ord_items.
READ TABLE i_ord_items
INTO wa_ord_items
WITH KEY vbeln = wa_inv_ord_items-vbelv
posnr = wa_inv_ord_items-posnv
BINARY SEARCH.
IF sy-subrc = 0.
gv_index = sy-tabix.
DELETE i_ord_items
INDEX gv_index.
ENDIF.
ENDLOOP.
Step 2c) Remove entries that exist in the invoiced orders internal table
to avoid duplicate entries
SORT i_ord_items BY vbeln posnr.
LOOP AT i_invoice_items INTO wa_invoice_items.
READ TABLE i_ord_items
INTO wa_ord_items
WITH KEY vbeln = wa_invoice_items-aubel
posnr = wa_invoice_items-posnv
BINARY SEARCH.
IF sy-subrc = 0.
gv_index = sy-tabix.
DELETE i_ord_items
INDEX gv_index.
ENDIF.
ENDLOOP.
get all open orders i.e. orders that have not been invoiced - End.
Combine the open orders and invoiced orders into one internal table
--Code added by CHHEDAM.SMS129705.Date- 03/28/2007--
Clear 'invoiced' orders if open orders are opted.
IF g_open EQ 'X'.
CLEAR: i_invoice_items[].
ENDIF.
--End of code added by CHHEDAM.SMS129705.Date- 03/28/2007--
IF g_open EQ 'X' OR g_both EQ 'X'.
LOOP AT i_ord_items INTO wa_ord_items.
CLEAR wa_invoice_items.
MOVE: wa_ord_items-vbeln TO wa_invoice_items-aubel,
wa_ord_items-posnr TO wa_invoice_items-posnv,
wa_ord_items-matnr TO wa_invoice_items-matnr.
APPEND wa_invoice_items TO i_invoice_items.
ENDLOOP.
ENDIF.
SORT i_invoice_items BY vbeln.
IF i_invoice_items[] IS NOT INITIAL.
SELECT *
FROM vbak
INTO TABLE gt_vbak_table
FOR ALL ENTRIES IN i_invoice_items
WHERE vbeln = i_invoice_items-aubel.
IF sy-subrc = 0.
DELETE gt_vbak_table
WHERE vkorg NOT IN s_vkorg OR
bukrs_vf NOT IN s_bukrs OR
auart NOT IN s_auart.
ENDIF.
SORT gt_vbak_table BY vbeln.
IF gt_vbak_table[] IS NOT INITIAL.
SELECT *
FROM vbap
INTO TABLE gt_vbap_table
FOR ALL ENTRIES IN gt_vbak_table
WHERE vbeln = gt_vbak_table-vbeln.
IF sy-subrc = 0.
DELETE gt_vbap_table
WHERE werks NOT IN s_werks OR
prodh NOT IN s_prdha.
ENDIF.
ENDIF.
ENDIF.
SORT gt_vbak_table BY vbeln.
SORT gt_vbap_table BY vbeln posnr.
LOOP AT i_invoice_items INTO wa_invoice_items.
READ TABLE gt_vbak_table
INTO gt_vbak_table_line
WITH KEY vbeln = wa_invoice_items-aubel
BINARY SEARCH.
IF sy-subrc = 0.
display_table_line-aubel = gt_vbak_table_line-vbeln.
display_table_line-vkorg = gt_vbak_table_line-vkorg.
display_table_line-auart = gt_vbak_table_line-auart.
display_table_line-bukrs_vf = gt_vbak_table_line-bukrs_vf.
display_table_line-bill_to = gt_vbak_table_line-kunnr.
display_table_line-vdatu = gt_vbak_table_line-vdatu.
display_table_line-faksk = gt_vbak_table_line-faksk.
display_table_line-lifsk = gt_vbak_table_line-lifsk.
ENDIF.
READ TABLE gt_vbap_table
INTO gt_vbap_table_line
WITH KEY vbeln = wa_invoice_items-aubel
posnr = wa_invoice_items-posnv
BINARY SEARCH.
IF sy-subrc = 0.
display_table_line-posnr = gt_vbap_table_line-posnr.
display_table_line-matnr = gt_vbap_table_line-matnr.
display_table_line-kdmat = gt_vbap_table_line-kdmat.
display_table_line-maktx = gt_vbap_table_line-arktx.
display_table_line-werks = gt_vbap_table_line-werks.
display_table_line-prodh = gt_vbap_table_line-prodh.
display_table_line-kwmeng = gt_vbap_table_line-kwmeng.
display_table_line-vrkme = gt_vbap_table_line-vrkme.
display_table_line-waerk = gt_vbap_table_line-waerk.
display_table_line-net_price = gt_vbap_table_line-netwr.
display_table_line-kzwi1 = gt_vbap_table_line-kzwi1.
display_table_line-kzwi2 = gt_vbap_table_line-kzwi2.
display_table_line-kzwi3 = gt_vbap_table_line-kzwi3.
display_table_line-kzwi4 = gt_vbap_table_line-kzwi4.
display_table_line-kzwi5 = gt_vbap_table_line-kzwi5.
display_table_line-wavwr = gt_vbap_table_line-wavwr.
display_table_line-mwsbp = gt_vbap_table_line-mwsbp.
ENDIF.
display_table_line-vbeln = wa_invoice_items-vbeln.
APPEND display_table_line TO display_table_line.
CLEAR wa_invoice_items.
CLEAR display_table_line.
ENDLOOP.
Get the Purchase Order Number, Sales District and Desc
IF display_table_line[] IS NOT INITIAL.
CLEAR: gt_vbkd_table.
CLEAR: gt_t171t_table.
SELECT *
FROM vbkd
INTO TABLE gt_vbkd_table
FOR ALL ENTRIES IN display_table_line
WHERE vbeln = display_table_line-aubel.
SORT gt_vbkd_table BY vbeln.
IF gt_vbkd_table[] IS NOT INITIAL.
SELECT *
FROM t171t
INTO TABLE gt_t171t_table
FOR ALL ENTRIES IN gt_vbkd_table
WHERE bzirk = gt_vbkd_table-bzirk.
ENDIF.
SORT gt_t171t_table BY bzirk.
ENDIF.
Get Ship To Account
IF display_table_line[] IS NOT INITIAL.
CLEAR: gt_vbpa_table.
SELECT *
INTO TABLE gt_vbpa_table
FROM vbpa
FOR ALL ENTRIES IN display_table_line
WHERE vbeln = display_table_line-aubel.
IF sy-subrc = 0.
DELETE gt_vbpa_table
WHERE parvw <> 'WE'.
ENDIF.
ENDIF.
SORT gt_vbpa_table BY vbeln parvw.
Get Ship To Name and City
IF gt_vbpa_table[] IS NOT INITIAL.
CLEAR: gt_kna1_table.
SELECT *
INTO TABLE gt_kna1_table
FROM kna1
FOR ALL ENTRIES IN gt_vbpa_table
WHERE kunnr = gt_vbpa_table-kunnr.
ENDIF.
SORT gt_kna1_table BY kunnr.
IF display_table_line[] IS NOT INITIAL.
CLEAR: gt_vbpa2_table.
SELECT *
INTO TABLE gt_vbpa2_table
FROM vbpa
FOR ALL ENTRIES IN display_table_line
WHERE vbeln = display_table_line-aubel.
IF sy-subrc = 0.
DELETE gt_vbpa2_table
WHERE parvw <> 'ZS' .
ENDIF.
ENDIF.
SORT gt_vbpa2_table BY vbeln parvw.
IF gt_vbpa2_table[] IS NOT INITIAL.
CLEAR: gt_kna12_table.
SELECT *
INTO TABLE gt_kna12_table
FROM kna1
FOR ALL ENTRIES IN gt_vbpa2_table
WHERE kunnr = gt_vbpa2_table-kunnr.
ENDIF.
SORT gt_kna12_table BY kunnr.
Get Sales Group and Desc
IF display_table_line[] IS NOT INITIAL.
CLEAR: gt_knvv_table.
SELECT *
INTO TABLE gt_knvv_table
FROM knvv
FOR ALL ENTRIES IN display_table_line
WHERE kunnr = display_table_line-bill_to AND
vkorg = display_table_line-vkorg AND
vtweg = '01'.
SORT gt_knvv_table BY kunnr vkorg vtweg.
IF gt_knvv_table[] IS NOT INITIAL.
CLEAR: gt_tvgrt_table.
SELECT *
INTO TABLE gt_tvgrt_table
FROM tvgrt
FOR ALL ENTRIES IN gt_knvv_table
WHERE vkgrp = gt_knvv_table-vkgrp AND
spras = sy-langu.
ENDIF.
SORT gt_tvgrt_table BY vkgrp spras.
ENDIF.
Get Order Status for the line items in the sales orders
IF display_table_line[] IS NOT INITIAL.
CLEAR: gt_vbup_table.
SELECT *
INTO TABLE gt_vbup_table
FROM vbup
FOR ALL ENTRIES IN display_table_line
WHERE vbeln = display_table_line-aubel AND
posnr = display_table_line-posnr.
ENDIF.
SORT gt_vbup_table BY vbeln posnr.
IF gt_vbup_table[] IS NOT INITIAL.
CLEAR: gt_tvbst_table.
SELECT *
INTO TABLE gt_tvbst_table
FROM tvbst
FOR ALL ENTRIES IN gt_vbup_table
WHERE spras = sy-langu AND
tbnam = 'VBUP' AND
fdnam = 'GBSTA' AND
statu = gt_vbup_table-gbsta.
ENDIF.
SORT gt_tvbst_table BY spras tbnam fdnam statu.
Get Blocked Reason Text for Billing and Delivery Block
IF display_table_line[] IS NOT INITIAL.
CLEAR: gt_tvfst_table.
SELECT *
INTO TABLE gt_tvfst_table
FROM tvfst
FOR ALL ENTRIES IN display_table_line
WHERE spras = sy-langu AND
faksp = display_table_line-faksk.
ENDIF.
SORT gt_tvfst_table BY spras faksp.
IF display_table_line[] IS NOT INITIAL.
CLEAR: gt_tvlst_table.
SELECT *
INTO TABLE gt_tvlst_table
FROM tvlst
FOR ALL ENTRIES IN display_table_line
WHERE spras = sy-langu AND
lifsp = display_table_line-lifsk.
ENDIF.
SORT gt_tvlst_table BY spras lifsp.
SORT display_table_line BY vbeln aubel posnr matnr.
DELETE ADJACENT DUPLICATES
FROM display_table_line
COMPARING aubel posnr matnr .
LOOP AT display_table_line INTO display_table_line.
gv_index = sy-tabix.
Get the Purchase Order Number, Sales District and Desc
READ TABLE gt_vbkd_table
INTO gt_vbkd_table_line
WITH KEY vbeln = display_table_line-aubel
BINARY SEARCH.
IF sy-subrc = 0.
display_table_line-bstkd = gt_vbkd_table_line-bstkd.
display_table_line-bzirk = gt_vbkd_table_line-bzirk.
READ TABLE gt_t171t_table
INTO gt_t171t_table_line
WITH KEY bzirk = gt_vbkd_table_line-bzirk
BINARY SEARCH.
IF sy-subrc = 0.
display_table_line-bztxt = gt_t171t_table_line-bztxt.
ENDIF.
ENDIF.
Get Ship To Account
READ TABLE gt_vbpa_table
INTO gt_vbpa_table_line
WITH KEY vbeln = display_table_line-aubel
parvw = 'WE'
BINARY SEARCH.
IF sy-subrc = 0.
display_table_line-ship_to = gt_vbpa_table_line-kunnr.
ENDIF.
Get Ship To Name and City
READ TABLE gt_kna1_table
INTO gt_kna1_table_line
WITH KEY kunnr = display_table_line-ship_to
BINARY SEARCH.
IF sy-subrc = 0.
display_table_line-ship_to_name = gt_kna1_table_line-name1.
display_table_line-ship_to_city = gt_kna1_table_line-ort01.
ENDIF.
Get Ship To Salesman Number
READ TABLE gt_vbpa2_table
INTO gt_vbpa2_table_line
WITH KEY vbeln = display_table_line-aubel
parvw = 'ZS'
BINARY SEARCH.
IF sy-subrc = 0.
display_table_line-salesrep = gt_vbpa2_table_line-kunnr.
ENDIF.
Get Ship To Salesman
READ TABLE gt_kna12_table
INTO gt_kna12_table_line
WITH KEY kunnr = display_table_line-salesrep
BINARY SEARCH.
IF sy-subrc = 0.
display_table_line-ship_to_srep = gt_kna12_table_line-name1.
ENDIF.
Get Sales Group and Desc
READ TABLE gt_knvv_table
INTO gt_knvv_table_line
WITH KEY kunnr = display_table_line-bill_to
vkorg = display_table_line-vkorg
vtweg = '01'
BINARY SEARCH.
IF sy-subrc = 0.
display_table_line-vkgrp = gt_knvv_table_line-vkgrp.
READ TABLE gt_tvgrt_table
INTO gt_tvgrt_table_line
WITH KEY vkgrp = gt_knvv_table_line-vkgrp
spras = sy-langu
BINARY SEARCH.
IF sy-subrc = 0.
display_table_line-bezei = gt_tvgrt_table_line-bezei.
ENDIF.
ENDIF.
Get Order Status for the line items in the sales orders
READ TABLE gt_vbup_table
INTO gt_vbup_table_line
WITH KEY vbeln = display_table_line-aubel
posnr = display_table_line-posnr
BINARY SEARCH.
IF sy-subrc = 0.
display_table_line-gbsta = gt_vbup_table_line-gbsta.
ENDIF.
READ TABLE gt_tvbst_table
INTO gt_tvbst_table_line
WITH KEY spras = sy-langu
tbnam = 'VBUP'
fdnam = 'GBSTA'
statu = display_table_line-gbsta
BINARY SEARCH.
IF sy-subrc = 0.
display_table_line-status = gt_tvbst_table_line-bezei.
ENDIF.
Get Blocked Reason Text for Billing and Delivery Block
READ TABLE gt_tvfst_table
INTO gt_tvfst_table_line
WITH KEY spras = sy-langu
faksp = display_table_line-faksk
BINARY SEARCH.
IF sy-subrc = 0.
display_table_line-fakskt = gt_tvfst_table_line-vtext.
ENDIF.
SELECT SINGLE vtext INTO display_table_line-lifskt
READ TABLE gt_tvlst_table
INTO gt_tvlst_table_line
WITH KEY spras = sy-langu
lifsp = display_table_line-lifsk
BINARY SEARCH.
IF sy-subrc = 0.
display_table_line-lifskt = gt_tvlst_table_line-vtext.
ENDIF.
Get Total Net and Total Gross Invoice Amount
display_table_line-brtwr = display_table_line-kzwi1 -
display_table_line-kzwi2 -
display_table_line-kzwi3 -
display_table_line-kzwi4 -
display_table_line-kzwi5.
Calculate Discount
display_table_line-disc = display_table_line-kzwi2 +
display_table_line-kzwi4.
Unit Price and cost.
IF display_table_line-kwmeng NE 0.
display_table_line-unit_price = display_table_line-brtwr /
display_table_line-kwmeng.
display_table_line-wavwr = display_table_line-wavwr /
display_table_line-kwmeng.
ELSE.
display_table_line-wavwr = 0.
ENDIF.
Calculate the GPM percentage.
IF display_table_line-unit_price NE 0.
display_table_line-gpm_perc = ( ( display_table_line-unit_price -
display_table_line-wavwr ) /
display_table_line-unit_price ) * 100.
ENDIF.
Update the internal table.
SHIFT display_table_line-matnr LEFT DELETING LEADING '0'.
SHIFT display_table_line-bill_to LEFT DELETING LEADING '0'.
SHIFT display_table_line-ship_to LEFT DELETING LEADING '0'.
SHIFT display_table_line-vbeln LEFT DELETING LEADING '0'.
SHIFT display_table_line-aubel LEFT DELETING LEADING '0'.
WRITE display_table_line-vdatu TO display_table_line-vdatu_char MM/DD/YYYY.
MODIFY display_table_line
INDEX gv_index
FROM display_table_line
TRANSPORTING vbeln aubel bzirk bztxt
bill_to ship_to ship_to_name ship_to_city
salesrep ship_to_srep vkgrp bezei
bstkd gbsta status fakskt
lifskt matnr vdatu brtwr
disc unit_price wavwr gpm_perc
vdatu_char.
CLEAR: display_table_line, tvbst_wa.
ENDLOOP.
IF s_vkgrp[] IS NOT INITIAL.
DELETE display_table_line WHERE vkgrp NOT IN s_vkgrp.
ENDIF.
IF s_bzirk[] IS NOT INITIAL.
DELETE display_table_line WHERE bzirk NOT IN s_bzirk.
ENDIF.
IF s_srep[] IS NOT INITIAL.
DELETE display_table_line WHERE salesrep NOT IN s_srep.
ENDIF.
SORT display_table_line BY vkorg vkgrp ship_to_srep bill_to.
DELETE display_table_line WHERE aubel = ' '.
ENDMETHOD. "read_main_data
METHOD display_report.
CALL METHOD alv_class->set_table_for_first_display
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT =
I_SAVE =
I_DEFAULT = 'X'
is_layout = gv_layout
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
IR_SALV_ADAPTER =
CHANGING
it_outtab = display_table_line[]
it_fieldcatalog = gt_field_cat
IT_SORT =
IT_FILTER =
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMETHOD. "display_report
Thanks in Advance,
Ramana Prasad.THi Janakiraman,
unfortunately we don't have an upload storage here in the SDN. At this point we have two options:
a) you could upload the screenshots to a website that provides storage and then you can paste the url to the screenshots here
b) we can route this through our support channel. You can send a message to our support team in the <a href="http://service.sap.com/smb/sbo/support">SAP Business One Support Center</a> in our <a href="http://service.sap.com/smb/sbo">SAP PartnerEdge Portal</a>.
Please use the method that works best for you.
Thanks,
Torsten -
Outbound delivery document flow shows TF document archived
Hi folks,
This could be a recurring problem.
Case is regarding STO. The outbound del. is supposed to create an IB del. However for some reason this is not happening.
When I checked the document flow, it shows "TF to stock in trans .49XXXX" AND the status as "archived".
Pl. let me know what needs to be done further.
Thanks.
Regards,Right Jürgen,
However, what could have caused the deletion. Its a prod. env. and all of a sudden its happened.
Whats the way out further for creating a PGI, I/B del. further steps.
Regards, -
Service document in document flow of inbound delivery
I need to delete an inbound delivery but system is not allowing me to do so .When I checked the document flow of inbound delivery,I found a service document is there, but I am not able to display teh service document,It says it does not exist,I even tried by ML81N.
With the support pack in case if material is serialized for such plant you can post goods receipt only in VL32N which would happen only during 105 mvt type and you cannot post goods receipt using MIGO.
-
Change the document flow, table CRMD_BRELVONAI
Hi experts,
We are using CRM and ISU. For few cases the ISUCONTRACT displayed in the CIC0 is wrong.
I would like to know if it's possible to change the document flow ? (the datas in table CRMD_BRELVONAI).
By transaction ?
by FM ?
Thanks in advance if you could help me.
Regards,
Nicolas.Nicolas,
Though I myself have not tried deleting any existing Doc Flow, but you can try using the Function Module: CRM_DOC_FLOW_UPDATE_DU.
If you get a better option please share.
Regards,
Shyamak -
Confirmation of Service - in delivery document flow
Hi
When i do the PGI for the delivery. Normally the document flow should have the Picking - Complete and the PGI Done. But in my case there is another document appearing in between these two i.e. confirmation of service completed.
I could not understand what this means and why this appearing,
can some one guide me the reason for this appearance and how to remove it.
In case some one wants the screen shot i can email it.
Regards
Rakesh JindalDear Mr Jindal,
Could you kindly verify the following:-
Is there any 'material to material conversion' during goods issue - any use of movement type 309?
Was any line item in the delivery deleted as part of processing?
Kindly refer the changes that were made to the delivery during processing.
The line on service is integral to the processing of the delivery and the only way out is to reverse goods movement and post it again.
It would be useful to delete the delivery.
Regards,
K Gopidas -
Sales order missing in table and document flow
Hi
This is my client sales process sales order-- delivery -- billing.
but when client check billing document flow ,found that some billing document don't have sales order no in document flow, checked in table as well but some sales order are missing but delivery and billing no's are there .
How to fetch missing sales order.
Regards
SanjitDear Sanjit,
Though this is abnormal but possible.
You can check following scenario yourself in Ides or test system
Create one sales order using VA01
create delivery with reference to sales order before saving delete all items from delivery and enter same items again. and save the delivery.
Now go to VL02n and check the document flow of that delivery. you will find sales order reference missing.
It looks like delivery type LF is created without reference to sales order.
And if you check the document flow of sales order it show no reference delivery is created.
Actually once you delete items form delivery all the references also gets deleted and then you can enter not only same material but can enter any material, any quantity and you can do PGI and billing also, system will not stop you anywhere but you can not find the reference sales order.
The only possible solution i think is delete the delivery doc and create again.
Regards
Mayank -
Cannot reverse GR. Error: "Document flow for delivery cannot be updated"
An STO has GI, GR and invoice verification. However, it appears the delivery was deleted such that when trying to reverse the GR, there is an error: "Document flow for delivery not be updated".
According to OSS Note 1499411, solution is:
Change your process so that the goods receipt (in stock transport order scenarios with replenishment deliveries) is always posted with reference to the replenishment delivery and never with reference to the purchase order.
If this is not possible and you have to work with the restrictions of a goods receipt with reference to the purchase order instead of the replenishment delivery, implement the attached corrections to be able to correctly post the GR reversal with reference to the stock transport order.
However, it does not say anything on how the GR of the existing STO will be reversed.
How will i reverse the GR in this case?
Thanks!
Best Regards,
ArmieUnfortunately, when I use MB0A and I input the delivery number under Find POs for Preceeding Document, it errors out as well as the delivery does not exist.
Any other option to reverse the GR? -
Proforma invoice number is not in the document flow of the order.
Hi all,
I have a doubt , if i create an proforma invoice based on order, and after that i create delivery and billing, i cannot able to see the proforma invoice in the document flow of the particular order. pls guide me on this
Thanks all
KumiHi,
Goto VTLA, and check the UPDATE DOCUMENT FLOW in the copy control
If it is already set , then directly from sales order you can find the Proforma invoice .
Goto the sales order in VA02 and enter into the overscreen and from there check the document flow ( F5), now you can see the Proforma invoices.
regards,
santosh
Maybe you are looking for
-
Can i move an app from one computer to another without downloading it again?
Is it possible to move an aplication downloaded from the App Store to a second computer without downloading it again. I live in an area where internet access is via satellite or cell towers and two attempts to download Mountain Lion have failed, but
-
No Sound on virtual Windows 2008 R2 terminal servers
Hello. I have a hyper-v server with 3 terminal servers (in fact there are two hyper-v with a totall of 6 terminal servers). Hyper-V server is W2K8R2 and so are the terminal servers. Users connect to the terminal servers using RDP and are unable to pl
-
File to Web Service - No back system in hoplist
Hi guys I've implemented a File to Web service Scenario with XI. The file is picked up from the server. The message monitoring in the Runtime Workbench shows the following error: "XI-Systemfehler erhalten. ErrorCode: NO_BACK_SYSTEM_IN_HOPLIST ErrorTe
-
Hi there, I am trying to make a JTable display the keyText of all the keys pressed, meaning if I write an "A" I want it to be shown as " shift + a ". Now I'm not quite sure about the way to handle the focus and how to trigger of the action that makes
-
Hello Suners, I'm developing a JEE application and using mojarra jsf implementation. I need to find a JSF Menu component that i can use in my app. Regards,