Displaying document flow in a BSP Page
In my BSP for a service notificaiton, I have the need to add a object that will display the document flow from the notificaiton. In addition the requirment is to be able to retrieve the sales order number from the flow and use it to callup the sales order as a BSP page. We modified the Service Notificaiton so that we can create different sales order types by using the action box, so we could have multipy sales order and quotations number we have to display. I checked on the ABAP form to see if there was anything there and I did find a few BAPI's that might work, but I also saw reference to tables that could store the data.
Has anybody here had to do this for a BSP page and if so what did you do.
Thanks again for all the help.
hi,
i used that code in scriplets. Actually my problem is I got one pdf file from session and i stored that file in a File object. the code is ..
File pdfDocument = (File) session.getAttribute(CommonConstants.EBILL_PDF_DOCUMENT);
now i have to display this pdf file in jsp..
Similar Messages
-
Regarding Display Document Flow.
Dear All,
In sap I am doing the outbound delivery,picking post goods issue, but when I go and check in the tab display document flow,the outbound delivery picking request and post goods issue is not appearing,please advice
Regards
Atul KeshavDear Atul
Please go to VTLA, select the item category for the combination of your order type and delivery type and see whether you have selected the box [Update document flow]
thanks
G. Lakshmipathi -
Passing arguments beetwen BSP pages
Hi,
I was following the example in the document to create my BSP page:
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/11099890-0201-0010-d695-ac642d35c708">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/11099890-0201-0010-d695-ac642d35c708</a>
But in page 14 tells me that I have to add an "automatic page attribute" in page display.htm that provides me an attribute introduced in other page search.htm to modify a SELECT clause on OnInicialization method.
I don't know how to add this atuomatic attribute and how to catch the value of this attribute.
Can somebody help me please??
Thanks in Advance!
SilviaPlease try posting your question in Business Server Pages (BSP). You'll get a better and quicker reply from there.
Regards -
Hi,
I was following the example in the document to create my BSP page:
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/11099890-0201-0010-d695-ac642d35c708">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/11099890-0201-0010-d695-ac642d35c708</a>
But in page 14 tells me that I have to add an "automatic page attribute" in page display.htm that provides me an attribute introduced in other page search.htm to modify a SELECT clause on OnInicialization method.
I don't know how to add this atuomatic attribute and how to catch the value of this attribute.
Can somebody help me please??
Thanks in Advance!
SilviaHi Siliva,
you can set this "automatic page attribute' in display.htm ---> page attribut(tab). Here you find Attribute, Auto, Typing, Associated Type and description.
You can check the Auto(Automatic) check box what the attributes which you want to use in the next page(In your case search.htm) and use those attributes with the same name to select or whatever. This is done so as to catch the values held by an attribute in the next page.
Regards,
Vinod. -
Error while opening BSP:page included for Technical Reasons: VIsta & Win7
Hi Experts,
when trying to open the Appriasal document in user worklist BSP page opens as an R/3 screen saying "this page is included for Techinical reason" and then stops. it is nop
This issue is faced in Windows Vista and Windows7 not in lower versions of Windows OS.
Any suggestions will be really helpful and will be rewarded
With Regards,
Dayakar.Hi Dayakar ,
Check in nwa if you see any traces related to the issue . Check how other BSP's behave in your portal and try viewing the contents directly from backend . You mentioned that the issue is coming in win7 , vista - so it could be that the portal is not compatible . Check out the compatibility in PAM .
Regards
Mayank -
Reclamations and returns DOCUMENT FLOW
Hi,
I ve to enhance the QM01/02/03 ,DOCUMENT FLOW when ever we press document flow push button,
QM02-
provide any QN number,
in the menu
extras -> document notifications->document flow->list
rifht now it is showing only 2/3 documents in tree
but it should be modified to
The standard SAP Document Flow, but it must be modified, in order to show all the subsequent documents, and the user must be able to go directly to each subsequent documents.
The flow must follow this hierarchy:
For documents type ZS/ZV
- Purchase Order
- QM Notif.
- Stock transfer or Scrapping
- Return Purchase Order
- Delivery
- Goods issue
- Goods receipt
- Invoice
For document Type: ZC.
- Reference document
- QM Notif.
- Return Sales Order or Credit memo req. or Debit memo req.
- Return invoice or Credit memo or Debit memo
This document flows should be shown for each QN in the QM11 transaction.
menu
Notification -> Display Document flow
It is a network flow that should as is but all the documents it should show.
it is internally calling Business objects
1. Goto transaction "QM02",
2. Provide some QN number
Observe: LIST
GRAPHIC
If u goto the sytem→status u ll find the program SAPLIQS0
Find the Function code responsible for DOCF
It will call a report program RIBELF20
For other GRAPHIC shown in above picture
U will find form exit FORM fcode_docf2_f00
Where we can create new program like above and we can insert our own Z Program.
But if u go to the program level and debug,
There is one FM "DISPLAY_DOCUMENT_FLOW_ALV" that is responsible for such type of display,
No issues,
But internally before that he extracted all the business Objects responsible for that.
How can I get all the business objects that are required to me to show the all the documents that I have already sent to u.
Below are my findings about the document flow at QM11 level.
When ever u press the Display document flow.
The O/P is
1. QM11 is the standard transaction using program RQMELL10.
We can not modify the standard SAP transaction, and insert our code in this program.
Alternative: we have to copy the program in Z namespace and attach the same to Z transaction code.
Confirm the same whether the users are ready to use the Z transaction.
2. Even though they accept for this:
The function Module responsible for the Network type of display is QM11_LESEN_BELEGDATEN_ALLG.
With the input parameters as (a) QN number (b) Business Object i.e. BUS2078 (Quality notification number) (c) maximum number of steps
The standard function module should be used in Z namespace program; the standard function module internally calls one more Function module
NERL_GET_NEIGHBOURHOOD that is responsible for the getting business objects of the corresponding number.
But this function module gets the only three documents data but not the else that are mentioned in the FD.
<b>Kindly provide any function module, which can meet such criteria, and the business objects of the related documents in the flow that is required.</b>Hi,
Goto the T.Code "VOV7".
Select your item category.
Details.
Maintain the Completion rule as "A(Item is completed with the first reference)".
Save.
If you do this after the follow on document is created,the item is completed and you cannot reject the item.
For your second question,
Goto the T.Code "VTLA".
Select your valid combination.
Click on item.Select your item category.Details.
There is a check box called as "Update document flow".Tick that one.
Save.
Regards,
Krishna. -
Dear All,
Can anyone suggest how, based on a list of sales orders i will be able to query to see the corresponding delivery numbers and invoice numbers?
Is there some way predefined in SAP? i just want to plug in the order numbers and geta report showing the order number, delivery number and invoice number or something like that.Hi,
1. You can do that using icon "display document flow" (Shift + F5) on VA03, VL03N, VF03.
2. Transaction SE38: programs: RIBELF00, RIBELF20. This should solve your problem.
Hope it will help ;-).
/MK
Edited by: Maciej Kromolicki on Jun 4, 2008 10:52 PM -
Change Currency in Document Flow
SD Experts,
I am noticing that when I display document flow under invoice the amount is displayed in EUR, however all documents are created in USD. Where can I change the currency so that when I display it document flow everythign shows USD. We only bill in USD.
Thank You for your help.Frank,
As per your current setting price exchange and currency is determined in invoice itself.
If you want same currency in all document Go to VTFL, select your Delevery and billing type, in the item category settings there is a "Pricing exchange type "maintain the value as " A" - copy from sales order
Try this and give feedback.
Thanks,
Raja -
How to do page break in the BSP page?
Hi,
I want to display the records in the BSP page, but the records are too many, I want to display them in several pages and I don't want to use tableview, I only want to write code to realize it.
Can anyone give me some suggestions about it?
Thanks very much. Awards will be provided.
Best Regards,
Chris GuHi,
You can look at <xhtmlb:pager> tag:
<xhtmlb:pager id = "pager"
design = "<%=cl_xhtmlb_pager=>co_design_horizontal_simple %>+<%=cl_xhtmlb_pager=>co_design_indicator %>"
hMin = "1"
hMax = "<%= LINES( record_table ) %>"
hIndex = "<%= l_index %>" />
You can check which action was done with the following code:
CASE l_event->event_class.
WHEN application->mk_evtcl_pager.
l_event_pager ?= l_event.
CASE l_event_pager->if_htmlb_data~event_type.
** Go to previous page/selected record
WHEN cl_xhtmlb_pager=>co_event_left OR cl_xhtmlb_pager=>co_event_1left.
SUBTRACT 1 FROM l_index.
** Go to next page/selected record
WHEN cl_xhtmlb_pager=>co_event_right OR cl_xhtmlb_pager=>co_event_1right.
ADD 1 TO l_index.
** Go to page/selected record with index given by the user
WHEN cl_xhtmlb_pager=>co_event_enter.
l_index = l_event_pager->hindex.
ENDCASE.
ENDCASE.
Regards,
Tanguy -
Regarding document flow given sales order
Hi All,
i have to write a report which displays document flow given a sales order number. I got the output by call dialog 'RL_DOCUMENT_FLOW' , but i need some idea on how to write a program for this without using above mentioned function module.Hi,
Please check table VBFA. It contains all the information about document flow in SD.
Assign points for helpful answers.
Ashven -
Calling a BSP page with flow logic from LAYOUT
Hello all. I am developing a BSP transaction to update HR data on SAP. I initially developed this with one 'page with flow logic' and several 'page fragment's. It has been suggested that I break this out into several pages with flow logic because the code in the 'OnInputProcessing' Event Handler was getting quite complicated. I was using the BSP directive to execute my 'page fragments'. This was very simple to do. What do I replace the BSP directive to call a page fragment with in order to call a page with flow logic. I have included the code below. I have converted the 'body.htm' 'page fragment' to a 'page with flow logic' and I am not sure of the correct way to call the page. I do not have access to the navigation->goto_page( 'body.htm' ) at this point. I am new to BSP and appreciate any help offered.
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<%@extension name="phtmlb" prefix="phtmlb" %>
<%@extension name="xhtmlb" prefix="xhtmlb" %>
<htmlb:content id = "content"
design = "design2002+design2003" >
<htmlb:document disableBackspaceNavigation="TRUE" >
<htmlb:documentHead title="ESS: Employee Self Service" >
</htmlb:documentHead>
<htmlb:documentBody>
<htmlb:form id="OOEform" >
<%-- Positioning --%>
<htmlb:gridLayout columnSize = "2"
rowSize = "2"
width = "100 %" >
<%-- Row 1 - Header --%>
<htmlb:gridLayoutCell columnIndex = "1"
rowIndex = "1"
colSpan = "2"
width = "100 %"
verticalAlignment = "MIDDLE" >
<DIV style="border-bottom-style:solid;border-color:#A5B1BF;border-width:20px">
<%@include file="header.htm" %>
</DIV>
</htmlb:gridLayoutCell>
<%-- Row 2; Column 1 (Body Area) --%>
<htmlb:gridLayoutCell columnIndex = "1"
rowIndex = "2"
width = "80%"
verticalAlignment = "MIDDLE" >
<%@include file="body.htm" %>
</htmlb:gridLayoutCell>
<%-- Row 2; Column 2 (Right Area) --%>
<htmlb:gridLayoutCell columnIndex = "2"
rowIndex = "2"
width = "20%"
verticalAlignment = "TOP"
horizontalAlignment = "LEFT" >
<%@include file="right.htm" %>
</htmlb:gridLayoutCell>
</htmlb:gridLayout>
</htmlb:form>
</htmlb:documentBody>
</htmlb:document>
</htmlb:content>Hi,
uhmmm, as it was previously suggested, you should perhaps think about MVC for your development. Working with classes and methods gives you more room for a better looking code. But at this point I´m not sure where your real problem is. You mentioned first that you created one page with logic and several page fragments and then you are worried because the code in the OnInputProcessing event is getting out of control
First, you cannot insert a page in a page. You can only insert fragments in a page with <%@include file="header.htm" %>.
Second, if you don´t have idea of MVC or you don´t want to switch to MVC, then create a modules program (SE38) where you´ll enter your code as subroutines and you call these subroutines from OnInputProcessing as follows:
perform subrout1 in program XXXXXX tables YYYYY using AAAAA.
In your programm XXXXX you declare the code as:
form subrout1 in program XXXXXX tables YYYYY using AAAAA.
This can be a substitute to classes and methods. -
Display image in BSP page,images are on a web server outside of SAP
Hi,
I am creating a BSP page for employee profile.The page needs to show an emp picture along with other info.The images are not in the MIME repository,they are stored in a separate web server.I am able to display the page using
<img border="0" src="http://.com/xyz/xyz.bmp" >
However this is a non secured test server. If the images are on a secured server,I am assuming,an id ,pswd authentication will be required.Can I get the authentication done automatically so that the page is rendered seamlessly for the end user?
Would SSO help if this web server is a portal server?what if the web server is not a portal server?Hi Manidipa,
The Http class in SAP can also be used in passing the required authentication information to the non-SAP portal system.
http://searchsap.techtarget.com/whitepaperPage/0,293857,sid21_gci1084087,00.html
There is an article written by Angeli Axel which does the same. The article has got ABAP HTTP classes and methods to get and post the parameters to the non-SAP portal system.
The same solution can be done by passing the credentials in the url. The custom solution would be to pass the required credentials in the url and the receiving application should grab those information from the url and confirm the authentication. After that it should be able to provide you the image. After getting the image it can be simply displayed in your BSP using iframe tag.
For eg if the receiving side is in java, then the following code can be used to receive the username and password. Once you get this you can verify the validity depending on the datasource whether LDAP(MS-ADS, Sun one, Novell edirectory) or ordinary database(Oracle, MS SQL Server .. etc) is used for storing the credentials.
try {
String userName = request.getParameter("username");
String password = request.getParameter("password");
if (validateUser(userName, password)) {
response.sendRedirect("mainpage.jsp");
The main page here you display the image
} catch (Throwable t) {
The above code should be considered as pseudo code for any server side language.
Please let me know if this helps.
With regards,
Rajesh Khanna Venkatesan. -
How to download data displayed in a BSP page into Excel sheet
Hi,
I'm displaying an internal table data into tableview of a BSP page. I want to provide a feature to download the tableview contents to Excel sheet from Internet Explorer. How do I do it? Can someone guide me.
Kedhar.Hi Kedhar,
welcome to SDN. You should try to use the Search functionality here. Then you will find this Weblog:
<a href="/people/thomas.jung3/blog/2004/09/02/creating-a-bsp-extension-for-downloading-a-table">Creating a BSP Extension for Downloading a Table</a>.
You can award points if this answer was helpfull.
Regards
Gregor -
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 -
Can I display a MS Word Document as part of a page
Hi,
Is it possible to display a MS Word document as part of a page (i.e. in a panelForm, panelBox) with ADF Faces? Any help is appreciated.
Best Regards,
SalimHi,
No, its impossible. I have never had that requirement, but if you want to review Word document as JSF page fragment, you can try to create helper servlet that gets MS Word and converts it to HTML (e.g using Apache POI - library to access Microsoft format files http://poi.apache.org/ ). Then you can try display this HTML using iframe or <jsp:include> and <f:verbatim> tag in your jsf page. I'ts my fast and free think - I have never tried this.
Kuba
Maybe you are looking for
-
Configuring resolution on Samsung SyncMaster 932BW monitor
I just bought a new Samsung SyncMaster 932BW monitor and can't figure out how to configure the resolution on it. It's widescreen, and supposed to be set at 1400 X 900, but the only options I have in the Displays System Preferences are 640 X 480, 800
-
Streaming Windows Media Player Issues
So I've searched all of support and to the best of my knowlege i can't find anything. I did find one thread that said to download Flip4Mac but that will not work for me. I am currently in my T-Mobile account trying to listen to some playback music on
-
Mackbook pro to flat screen tv
I have a 07 macbook pro if i install lion on it will airplay work from the macbook pro to my flat screen tv ?
-
Connecting to netgear WG111v2 wireless network
My daughter has come home from college with her Macbook Pro 17/2.4CTO which she bought in September. At home we have a Windows Vista PC, running Netgear WG111v2 wireless network. The Mac can see the name of the network, but can't connect to it. We ar
-
Hi, I am trying to create a date prompt Field - Service Date Data type - Date dd/mm/yyyy I would like the date prompt to be <= Service Date in format MON-YY e.g. <= 'AUG-12' I have tried but get error: A datetime value was expected (received "AUG-12"