Over Counter Credit Sales
I have seen many threads with similar questions to mine, but I'm still clear with the solution. Our client does over the counter credit sales. Customer arrives takes the goods without paying but he collects the invoice. He pays on a credit basis as agreed upon. So basically at any given point in time, customer might call and ask for his statement and pays up all his dues.
I create a Sales Order, and delivery must created, picked automatically, and invoice must all be created, and printed upon saving the Sales Order. I believe this should be the process. Correct me if I'm wrong. I also understand that there's an automatic background PGI, and automatic background invoicing, however this method takes a lot of time to print the invoice. I need instant invoice printout on saving the Sales Order. Perhaps this is an enchanment or something? Please provide me whatever information you can on this matter.
Thanks
Hi,
Instant Invoice is possible in Cash Sales Process.
Order Type: CS settings as follows:
Shipping condition = Immediatly
Immediate delivery switch = Activated "Immediate"
In cash sales when you process the order automatically delivery will happen.Go back to oder and take print out that itself is a order confirmation and invoice to the customer and later on internally or in back ground billing will be done.
Cash sales always have order related billing so when you save cash sales a recipt is generated with Output type RD03 this can be given as invoice to customer. Later on we can create billing document with the help of billing due list but Note that no output is generated for the billing document because the recipt which is generated by RD03 would have already been given to customer as Invoice.
Regards
Similar Messages
-
Hi All
My requirement is result of report should display no. of sales orders per year/ Per sales organisation/per item. Anyone can suggest me how to proceed to create such type of report in BI7.0.
Thanks
VaniHi Vani,
If we have counter in cube for sales orders then we can create RKF on the counter by restricting it to year, sales org & material else what we can do is we can create a ckf or new formula to create counter for sales documents give exception aggregation as counter for all detailed values and take reference characteristic as sales document then restrict this key figure to year/sales org/item.
we can achieve our requirement by doing this.
Hope it helps,
Thanks,
Sathish. -
Different sales document for cash sale & credit sale
Dear SAP GURUS,
I have range of finish goods. I am selling that on cash and also on credit. I want different sales order type for the cash sale & for credit sale even though the FG is same and the customer is also same.
How can I resolve this issue.
Thanks
CHEERSHi Nitin
you have standard SAP-docs for this kind of process , for cash sales - doc type -CS, for credit sales you can use the same standard : OR -doc type , nothing need to be configured here
note- you can create your own set of doc by copying the standard docs but it need alot of configuration ,so now you understand it
regards
venkat
Edited by: K.Venkata Chalapathi on Feb 24, 2010 7:24 AM -
Credit sales order with credit check without top up limit
Hi Experts,
I have a silly question, just wanted to confirm is this possible in SAP system?
I have check thru seem no such function.
My user requested a requirement is credit sales order with credit limit check however without top up credit limit to specific customer. eventually allow this specific customer sales order, delivery order without blocking and created succesfully?
Thanks & Regards,
Yong Kok WahHi,
Use a seprate risk category for such customer. In OVA8 Setting for the given risk category set the Credit Limit Seasonal factor.
By means of above setting system will support the concept of TOP Up credit limit (for a given time period) for given customer against said credit limit.
Regards
Digambar Pandey -
Where to find Credit Sales -- which datasource please help
Hi BI experts,
I have a requirement to find the Credit Sales from Billing datasources or FI-GL datasources. In case anyone have a pointer or suggestion please let me know.
I looking for any indicator or value of any char or pricing terms or anything like that suggest it could be a sales done is on credit....
Any ideas appreciated.
Regards,
BWerSince most non-retail organizations do sales on credit, the sales document extractors should give you the SD information needed:
2LIS_11_VAHDR - Sales Order Header
2LIS_11_VAITM - Sales Order Line Item
2LIS_11_VAKON - Sales Order Conditions
2LIS_11_VASCL - Sales Order Schedule Lines
And the Accounts Receivable side:
0FI_AR_4 - Accounts Receivable Line Items -
What do you mean by credit sales
what is credit sales , can any one please explain giving a detailed information and path
Hi,
Credit and risk management, takes place in the credit control area. According to your corporate requirements, you can implement credit management that is centralized, decentralized, or somewhere in between.
An organizational unit that represents the area where customer credit is awarded and monitored. This organizational unit can either be a single or several company codes, if credit control is performed across several company codes. One credit control area contains credit control information for each customer.
For example, if your credit management is centralized, you can define one credit control area for all of your company codes.
If, on the other hand, your credit policy requires decentralized credit management, you can define credit control areas for each company code or each group of company codes.
Credit limits and credit exposure are managed at both credit control area and customer level. You set up credit control areas and other data related to credit management in Customizing for Financial Accounting. The implementation guide is under Enterprise Structure -> Definition or Assignment -> Financial Accounting and then Maintain credit control area. You assign customers to specific credit control areas and specify the appropriate credit limits in the customer master record.
Settings for determining the credit control area of a document. The settings of items 1 - 4 are taken into account according to their priority. The credit control area found is stored in field VBAK-KKBER.
1. Transaction OB38
Check which credit control area is assigned to the company code.
Company code:
Credit control area:
2. Transaction OVFL
Check which credit control area is assigned to the sales area.
Sales area:
Credit control area:
3. Transaction XD02 or VD02
Check which credit control area is assigned to the payer.
Payer:
Credit control area:
4. Transaction SE37
Is user exit EXIT_SAPV45K_001 being used?
5. Transaction OBZK
For the settings under items 2 - 4, field "All company codes" must be marked in Transaction
OB45, or the credit control area must be entered under the relevant company code in table
T001CM of the credit control areas allowed.
Company code:
Credit control areas allowed:
6. Settings for the credit checks
7. Transaction OVAK
Which settings do exist for the sales document type used?
Sales document:
Check credit:
Credit group:
8. Transaction OVAD
Which settings do exist for the delivery type used?
Delivery type:
Credit group for delivery:
Credit group for goods issue:
9. Transaction OB01
Credit management/Change risk category
Definition of the risk category for each credit control area. This risk category can be
assigned to a credit account by using Transaction FD32.
10. Transaction OVA8
Here, the individual credit checks for key fields
o credit control area
o risk category
o credit group are set. Take these key fields from the above settings and go to the detail
screen. In particular, check whether fields "Reaction" and "Status/block" are set
correctly. To carry out follow-up actions in case of a credit block, the credit check
status must be set (field "Status/block").
11. Transaction FD32
Credit master data for the payer of the relevant document.
Credit account:
Credit limit:
Risk category:
Currency:
Reward if Helpful -
Handling Credit Sales at a Store
Dear all,
I am struggling with some very basic POS level store operations fundamentals and would appreciate any insight on them.
FACTS:
u2022SAP Retail is implemented at the back end
u2022There is no SRS (Retail Store) in the store
u2022The Customer is using a 3rd part POS software (Wincor Nixdorf) and not SAP POS
u2022Our client here is not a Retailer in the true sense of the word. They also cater to u2018creditu2019 customers. i.e. a lot of u2018knownu2019 (with master records in SAP and also sent to POS) customers coming in the store and buying goods on credit (i.e. not making immediate payment at stores). The sales process is estimated to happen only through POS terminals at store
u2022The 3rd Party POS does not have u2018Sales Order OR Customers with creditu2019 handling functionality
PROBLEM STATEMENT
Now,
u2022During POS interface, we would obviously now have to debit the known customer clearing account and credit the Revenue account (A regular POS sales incoming through WPUBON debits the Storeu2019s CUSTOMER master and credits the Revenue Account)
u2022We would have to take care of handling outbound deliveries (complete or split) at store!
u2022We would have to take care of availability check, credit limit check and dynamic updating of credit limit at the store!
u2022We would have to handle customer payments (clearing of their receivables maybe after 2-3 months) at the store!
u2022Etc etc
POINTERS
Any idea of how this can be achieved at the 3rd party store POS by integrating with SAP ERP?
u2022If we decide to handle credit sale through standard SAP SD route by installing SAP GUI at the store, we run the risk of dual Sales reporting (POS sales and SAP SD sales), feeding into 2 separate cubes/data sources of BI, not being able to use POSDM to handle SD sales etc. I would also then not be able to use Bonus Buys
u2022Developments are the 2nd choice? Basically the idea is to handle credit sales at the POS?
Any school of thought (similar dilemma faced) is welcome!
Regards
GkDear Naveen,
Thanks a lot for your inputs. Please see my answers to the sme below:
1. I dont see an issue with Sales Reporting. You can extract only the Billing data to BI and this would be common for both POS and SD Sales.
I STILL BELEIVE SOME TWEAKING AROUND WITH THE STANDARD BI CONTENT WOULD BE REQUIRED. STANDARD SD SALES ARE FOR E.G. REFELECTED IN S001, S002, S003 INFOSTRUCTURES ETC, WHILE THE POS SALES ARE REFLECTED IN S120
2. What happens if there is no credit for the customer, but he is willing to pay cash. You must configure the downpayment scenario for SD Sales. The Cash needs to be collected in POS
IF WE ARE IN FACT USING SAP GUI AT THE STORE, WHY CAN'T WE HANDLE DOWN PAYMENT ENTIRLY THORUGH SAP SD WITHOTU POS COMING INTO THE PICTURE. DOWN PAYMETN COLLECTION ALSO WOULD BE HANDLED THROUGH SAP SD AS A STANDARD FUNCTIONALITY
3. As you mentioned, Bonus Buys cannot be used for SD Sales. The best you can do is replicate the same Bonus Buy as Free Goods in the promotion (Note that Free Goods cannot support all the functionality that Bonus Buy offers) You woul also need to activate Promotion determination in SD if you want to further analyse Promotional Sales.
YOU ARE RIGHT
If you go for Sales Via POS only always, you will need to keep the following in mind -
1. think on the lines of RFC call to SAP for dynamic credit check for known customers.
WE ARE THINKING OF USING CREATING AND CONSUMING SOME WEB SERVICE TO READ A KNOWN CUSTOMER'S CREDIT LIMIT AND REJECT POS BILLING IF CREDIT LIMIT IS INSUFFICIENT
2. Interface to Create Sales Order in SAP. Again I dont see this impacting Sales Analysis as you would be extracting Billing data only.
WHY DO WE NEED TO CREATE SALES ORDER IN SAP. WE ONLY NEED TO CHECK IF THE POS GIVES A TENDER TYPE CALLED
"CREDIT" AND IF SO, WE CREATE A FINANCIAL DOCUMENT INCREASING CUSTOMER RECEIVABLES AND REVENUE. ASSUMPTION IS THAT POS IS ABLE TO GIVE ME THIS TENDER TYPE AND ALSO GIVESME THE KNOWN CUSTOMER'S NAME
3. Do you have scenarios where the goods are delivered to the known customer on a future date?
YES, AND WE ARE STILL PONDERING ON HOW TO ADDRESS THIS
4. What about delivery from Vendor to the customer? (Third Party Orders) etc.
WILL BE DONE ENTIRELY THROUGH SAP S THROUGH PHONE CALL OR CUSTOMERS DIVERTED TO THE DC WHERE THE ORDER WILL BE RAISED -
Will Going Over The Credit Limit One Time Hurt Score Long Term?
I have a flexible spending Chase Sapphire preferred card that has a limit of $7000. I don't know when, but according to my credit report it shows that my high balance at one point in time was at $11k - I'm guessing this was several several months ago if not over a year. I don't ever keep my balance that high, and I'm sure it was only at that balance for 24-48 hours, and Chase just happened to report to the CB's the day the balance was that high (lucky me). Currently my balance is really low , around $150. I usually keep the balance at less than $500 at any one time (and if it goes over that, I pay it down several times a month just in case). Anyway, my lender told me that if I raised my credit limit to around $15k (or at least higher than the $11k balance it had at one time), it would raise my score considerably because it would show that I never went above the limit. So I called Chase, and luckily I was able to get the limit raised to about $13k. I was pre-approved for it, so they did not need to run my credit (good news I guess). My question is - should I expect a score increase just because the one time high blaance of $11k is now under my new $13k limit (instead of over the $7k limit it had). I thought I knew a lot about how credit scores worked, but this is new to me. Is the lender blowing smoke or is this actually a normal thing to expect? Thx
CH-7-Rebuilding wrote:
Do you see that smoke in the air? Yep, your lender has no idea what they are talking about. Lots of people have signature cards that have, say, a 5K limit, and might have a 20K high credit. That is what a signature card is for! You just have to pay off the amount over the credit limit when the bill comes in. That high credit amount above the limit had no effect on your FICO score. The raising of the limit might impact your score if it lowers your current utilization, but otherwise it should not matter as far as FICO. It will help getting higher limits with other lenders, though. bingo! many of us move limits or have been CLD during the crunch and have "high balance" many times greater than our CL. lender is a dummy. -
Count of Sales documenst in a ALV report
Hi Gurus!
I have an ALv report that gives me a list of sales document number with other data associated with it like the material number , status , date , iem ect ect. Each docum,ent can have several line items associated with it and it shows on teh report . I have used a count column in my report which gives me the count of line items in the report . Now what I want is the count of documnet numbers in the report rather than the count of line items , which will enable to know how many sales document are ther in the report for therie r report purpose. Is ot possible to get a count of teh document numbers in the ALV report output apart from teh count of the line items . Will I ahve to make changes in my report or it can be acheived in the layout itself. Kindly advice please.
ThanksI ahve done as said
report zztest message-id zsd no standard page heading.
* For ALV usage
type-pools: slis.
data: gs_layout type slis_layout_alv,
tp_print type slis_print_alv,
gt_sort type slis_t_sortinfo_alv,
gt_events type slis_t_event,
t_fieldcat type slis_t_fieldcat_alv with header line,
repid type syrepid, " ABAP Program.
gt_list_top_of_page type slis_t_listheader, " Top of page text.
alv_variant type disvariant. " Customize Disp. Variant
data: w_field type slis_fieldcat_alv.
data: gs_list_top_of_page type slis_listheader.
data: l_count type I.
data: l_vbeln type I.
tables: vbak, vbap, vbpa, knvv.
*DATA : v_count type N.
DATA : count1 type N.
* Definition of selection screen *
* By plant, storage location, sold-to customers, material and *
* posting date of the sales orders *
selection-screen begin of block one with frame title text-001.
parameters: p_vkorg type vkorg obligatory memory id vko,"DEVK906677
p_vtweg type vtweg obligatory default '01',
p_spart type spart obligatory default '01'.
select-options: s_vkbur for vbak-vkbur, " Sales Office "DEVK906677
s_kunnr for vbak-kunnr. " Sold-to customer number.
select-options: s_shipto for vbap-oid_ship, " Ship-to customer number.
s_billto for vbpa-kunnr, " bill-to from S.O. header.
s_load for vbpa-kunnr, " Load confirmation contact.
s_truck for vbap-oid_extbol. " Trucking ticket number.
select-options: s_werks for vbap-werks obligatory no intervals. " Plant.
select-options: s_lgort for vbap-lgort. " Storage location.
select-options: s_matnr for vbap-matnr. " Material number.
select-options: s_konda for knvv-konda. " price group
selection-screen skip 1.
select-options: s_vdatu for vbak-vdatu default sy-datum.
selection-screen end of block one.
* ALV display layout
selection-screen begin of block layout with frame title text-003.
parameters: pa_vari type slis_vari default ' '. " Display variant.
selection-screen end of block layout.
selection-screen begin of block two with frame title text-028.
selection-screen comment: /1(79) text-029.
selection-screen comment: /1(79) text-030.
selection-screen comment: /1(79) text-031.
selection-screen comment: /1(79) text-032.
selection-screen comment: /1(79) text-033.
selection-screen comment: /1(79) text-034.
selection-screen comment: /1(79) text-035.
selection-screen comment: /1(79) text-036.
selection-screen end of block two.
* Data Definitions *
* Storing Extracted Info.
types: begin of t_extract,
vbeln type vbeln_va, " Sales order number.
augru type augru, " order reason
vdatu type edatu_vbak, " Requested delivery date.
kunnr type kunag, " Sold-to customer number.
posnr type posnr_va, " Item number.
matnr type matnr, " Material number.
vrkme type vrkme, " Sales UoM.
mseh3 type mseh3, " UoM text.
netwr type netwr_ap, " Net value of the order item.
kwmeng type p length 13 decimals 1, " Quantity.
werks type werks_d, " Plant.
lgort type lgort_d, " Storage location.
oid_extbol type oid_extbol, " External BOL or truck ticker header.
maktx type maktx, " Material description.
soldto_name type name1_gp, " Sold-to name.
oid_ship type kunwe, " Ship-to customer number.
shipto_name type name1_gp, " Ship-to name.
billto type kunre, " Bill-to customer number.
billto_name type name1_gp, " Bill-to name.
load_contact type kunnr, " Load confirmation contact.
load_name type name1_gp, " Load confirmation contact name.
truck type kunnr, " Truck company number.
truck_name type name1_gp, " Truck company name.
bstkd type bstkd, " PO number.
ihrez type ihrez, " AFE number per the contract/sales order.
delivery type vbeln_vl, " Delivery number.
posnr_vl type posnr_vl, " Delivery item number.
bill_vbeln type vbeln_vf, " Invoice number.
bill_posnr type posnr_vf, " Invoice item number.
bill_netwr type netwr_fp, " Invoice net value.
statu type stats, " Document status.
auart type auart, " order type
vkorg type vkorg, " sales org.
vtweg type vtweg, " distrbtn channel
spart type spart, " division
vkbur like vbak-vkbur, " Sales Office DEVK906677
konda type konda, " price group
tdline type tdline, " text for customer account reference
count type I ,
end of t_extract.
data :
it_extract type table of t_extract with header line,
it_extract2 type table of t_extract with header line.
data: it_text type table of tline with header line.
data: w_index type sy-index,
w_tdname type tdobname.
constants: c_minus1 type netwr_ap value '1.00-'.
*RANGES: r_auart FOR vbak-auart.
data: r_auart type range of t_extract-auart,
r_auart_line like line of r_auart.
* initialization
initialization.
gs_layout-colwidth_optimize = 'X'.
tp_print-no_print_listinfos = 'X'.
tp_print-no_coverpage = 'X'.
perform set_fieldcat.
perform alv_eventtab_build using:
** Event name Form to execute Event internal table
'TOP_OF_PAGE' 'TOP_OF_PAGE' gt_events[].
* changed to exclude following order types
r_auart_line-sign = 'I'.
r_auart_line-option = 'EQ'.
r_auart_line-low = 'ZEQ'.
clear r_auart_line-high.
append r_auart_line to r_auart.
* credit memo
r_auart_line-sign = 'I'.
r_auart_line-option = 'EQ'.
r_auart_line-low = 'ZPRC'.
clear r_auart_line-high.
append r_auart_line to r_auart.
* debit memo
r_auart_line-sign = 'I'.
r_auart_line-option = 'EQ'.
r_auart_line-low = 'ZPRD'.
clear r_auart_line-high.
append r_auart_line to r_auart.
r_auart_line-sign = 'I'.
r_auart_line-option = 'EQ'.
r_auart_line-low = 'ZDR'.
clear r_auart_line-high.
append r_auart_line to r_auart.
* Industry sales order correction
r_auart_line-sign = 'I'.
r_auart_line-option = 'EQ'.
r_auart_line-low = 'ZSOC'.
clear r_auart_line-high.
append r_auart_line to r_auart.
* oilfield FF correction
r_auart_line-sign = 'I'.
r_auart_line-option = 'EQ'.
r_auart_line-low = 'ZOCF'.
clear r_auart_line-high.
append r_auart_line to r_auart.
* oilfield WP correction
r_auart_line-sign = 'I'.
r_auart_line-option = 'EQ'.
r_auart_line-low = 'ZOCW'.
clear r_auart_line-high.
append r_auart_line to r_auart.
* Dropdown list for all created ALV layouts, global or user-specific
at selection-screen on value-request for pa_vari.
perform alv_variant_f4 changing pa_vari.
* Main BODY of processing logic
start-of-selection.
perform extract_data.
end-of-selection.
if not it_extract[] is initial.
* Build headings for report.
perform build_top_of_page using gt_list_top_of_page[].
perform call_alv.
endif.
*& Form EXTRACT_KEY_DATA
* Retreive the data for the report.
form extract_data.
clear: it_extract. refresh: it_extract.
* orders
select vbak~vbeln vbak~auart vbak~augru vbak~vkorg vbak~vtweg
vbak~spart vbak~vdatu vbak~kunnr vbak~vkbur
vbap~posnr vbap~matnr vbap~vrkme vbap~netwr vbap~kwmeng
vbap~werks vbap~lgort vbap~oid_extbol vbap~oid_ship
into corresponding fields of table it_extract
from vbak inner join vbap
on vbak~mandt = vbap~mandt
and vbak~vbeln = vbap~vbeln where
vbak~auart not in r_auart and
vbak~vkorg eq p_vkorg and
vbak~vtweg eq p_vtweg and
vbak~spart eq p_spart and
vbak~vkbur in s_vkbur and "DEVK906677
vbak~vdatu in s_vdatu and
vbak~kunnr in s_kunnr and
vbap~matnr in s_matnr and
vbap~werks in s_werks and
vbap~lgort in s_lgort and
vbap~oid_extbol in s_truck and
vbap~oid_ship in s_shipto.
if sy-subrc <> 0.
message i000 with text-002 ' ' ' ' ' '.
endif.
sort it_extract by vbeln.
check sy-subrc = 0.
loop at it_extract.
at new vbeln.
count1 = count1 + 1.
endat.
* Retrieve and select by load confirmation contacts from header
select single kunnr from vbpa into it_extract-load_contact
where vbeln = it_extract-vbeln
and posnr = '000000'
and parvw = 'ZB'.
if it_extract-load_contact in s_load.
it_extract-load_name = zcl_kna1=>get_name1( it_extract-load_contact ).
else.
delete it_extract.
continue.
endif.
* Retrieve and select by sales order bill-to on header level
* as well as lookup bill-to customer name/description
select single kunnr from vbpa into it_extract-billto
where vbeln = it_extract-vbeln
and posnr = '000000'
and parvw = 'RE'.
if sy-subrc = 0.
if s_billto is initial.
it_extract-billto_name = zcl_kna1=>get_name1( it_extract-billto ).
else.
if it_extract-billto in s_billto.
it_extract-billto_name = zcl_kna1=>get_name1( it_extract-billto ).
else.
delete it_extract.
continue.
endif.
endif.
else.
* Newalta - always has bill-to, following will not occur but included
* as good programming practice.
it_extract-billto_name = it_extract-billto.
endif.
* Retrieve and select by price group of sold-to
select single konda from knvv into it_extract-konda
where kunnr = it_extract-kunnr
and vkorg = it_extract-vkorg
and vtweg = it_extract-vtweg
and spart = it_extract-spart.
if sy-subrc = 0.
if not ( it_extract-konda in s_konda ).
delete it_extract.
continue.
endif.
endif.
* Retrieve trucking company customer
select single kunnr from vbpa into it_extract-truck where
vbeln = it_extract-vbeln and
posnr = '000000' and
parvw = 'ZT'.
if sy-subrc = 0.
it_extract-truck_name = zcl_kna1=>get_name1( it_extract-truck ).
endif.
* Retrieve sold-to name
it_extract-soldto_name = zcl_kna1=>get_name1( it_extract-kunnr ).
* Retrieve ship-to name
it_extract-shipto_name = zcl_kna1=>get_name1( it_extract-oid_ship ).
* lookup P.O.
select single bstkd ihrez from vbkd into (it_extract-bstkd, it_extract-ihrez)
where vbeln = it_extract-vbeln
and posnr = '000000'.
* Retreive the material description.
it_extract-maktx = zcl_material=>get_maktx( it_extract-matnr ).
* cosmetic change of material number, donot display leading zeros.
shift it_extract-matnr left deleting leading '0'.
* translate unit of measure
it_extract-mseh3 = it_extract-vrkme.
select single mseh3 from t006a into it_extract-mseh3
where spras = sy-langu
and msehi = it_extract-vrkme.
w_tdname = it_extract-vbeln.
* read customer account reference which is under 'text'
call function 'READ_TEXT'
exporting
client = sy-mandt
id = 'Z010'
language = sy-langu
name = w_tdname
object = 'VBBK'
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER =
tables
lines = it_text
exceptions
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
others = 8.
if sy-subrc = 0.
read table it_text index 1.
if sy-subrc = 0.
it_extract-tdline = it_text-tdline.
else.
clear it_extract-tdline.
endif.
else.
clear it_extract-tdline.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
* Get the delivery item.
call method zcl_vbap=>get_delivery
EXPORTING
itp_vbeln = it_extract-vbeln
itp_posnr = it_extract-posnr
IMPORTING
etp_vbeln = it_extract-delivery
etp_posnr = it_extract-posnr_vl.
if it_extract-delivery is not initial.
perform process_deliveries.
else.
perform invoice_process.
endif.
it_extract-count = 1.
move-corresponding it_extract to it_extract2.
append it_extract2.
endloop.
describe table it_extract2 lines count1.
endform. " EXTRACT_DATA
*& Form SET_FIELDCAT
* Create the field catalogue.
form set_fieldcat .
clear w_field.
clear t_fieldcat. refresh t_fieldcat.
w_field-col_pos = 1.
w_field-fieldname = 'VBELN'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Document.Nbr'.
w_field-emphasize = 'X'.
w_field-hotspot = 'X'.
append w_field to t_fieldcat.
clear w_field.
w_field-col_pos = 2 .
w_field-fieldname = 'POSNR'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Item'(023).
append w_field to t_fieldcat.
clear w_field.
w_field-col_pos = 3 .
w_field-fieldname = 'VDATU'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Req. Del. Date'(005).
append w_field to t_fieldcat.
w_field-col_pos = 4 .
w_field-fieldname = 'SOLDTO_NAME'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Sold-to'(006).
append w_field to t_fieldcat.
w_field-col_pos = 5 .
w_field-fieldname = 'MATNR'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Material'(007).
append w_field to t_fieldcat.
w_field-col_pos = 6 .
w_field-fieldname = 'KWMENG'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Quantity'(008).
append w_field to t_fieldcat.
w_field-col_pos = 7.
w_field-fieldname = 'MSEH3'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'UOM'(009).
append w_field to t_fieldcat.
w_field-col_pos = 8 .
w_field-fieldname = 'BILL_VBELN'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Invoice #'(010).
w_field-emphasize = 'X'.
w_field-hotspot = 'X'.
append w_field to t_fieldcat.
clear w_field.
w_field-col_pos = 9 .
w_field-fieldname = 'BILL_NETWR'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Values'(011).
append w_field to t_fieldcat.
w_field-col_pos = 10.
w_field-fieldname = 'WERKS'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Plant'(012).
append w_field to t_fieldcat.
w_field-col_pos = 11.
w_field-fieldname = 'LGORT'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Storage Loc'(013).
append w_field to t_fieldcat.
w_field-col_pos = 12 .
w_field-fieldname = 'MAKTX'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Description'(014).
append w_field to t_fieldcat.
w_field-col_pos = 13 .
w_field-fieldname = 'SHIPTO_NAME'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Ship-to'(015).
append w_field to t_fieldcat.
w_field-col_pos = 14 .
w_field-fieldname = 'BILLTO_NAME'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Bill-to'(016).
append w_field to t_fieldcat.
w_field-col_pos = 15 .
w_field-fieldname = 'LOAD_NAME'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Load Contact'(017).
append w_field to t_fieldcat.
w_field-col_pos = 16 .
w_field-fieldname = 'TRUCK_NAME'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Truck Comp.'(018).
append w_field to t_fieldcat.
w_field-col_pos = 17 .
w_field-fieldname = 'BSTKD'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'P.O.'(019).
append w_field to t_fieldcat.
w_field-col_pos = 18 .
w_field-fieldname = 'IHREZ'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'AFE Nbr'(020).
append w_field to t_fieldcat.
w_field-col_pos = 19 .
w_field-fieldname = 'OID_EXTBOL'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Truck Ticket'(021).
append w_field to t_fieldcat.
w_field-col_pos = 20.
w_field-fieldname = 'STATU'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Status'(022).
append w_field to t_fieldcat.
w_field-col_pos = 21.
w_field-fieldname = 'AUGRU'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Ord.Reason'(024).
append w_field to t_fieldcat.
w_field-col_pos = 22.
w_field-fieldname = 'TDLINE'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'cstmr.acct.ref.'(027).
append w_field to t_fieldcat.
w_field-col_pos = 23 . "DEVK906678
w_field-fieldname = 'VKBUR'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Sales Office'(037).
append w_field to t_fieldcat.
w_field-col_pos = 24.
w_field-fieldname = 'KUNNR'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Sold-to Customer'(038).
append w_field to t_fieldcat.
w_field-col_pos = 25.
w_field-fieldname = 'OID_SHIP'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Ship-to Customer'(039).
append w_field to t_fieldcat.
w_field-col_pos = 26.
w_field-fieldname = 'BILLTO'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Bill-to Customer'(040).
append w_field to t_fieldcat.
w_field-col_pos = 27.
w_field-fieldname = 'COUNT'.
w_field-tabname = IT_EXTRACT2.
w_field-seltext_l = 'Count'(041).
w_field-do_sum = 'X'.
append w_field to t_fieldcat.
endform. " SET_FIELDCAT
*& Form CALL_ALV
* Call the ALV Grid function.
form call_alv .
sort it_extract by lgort vbeln.
* repid is necessary since the ALV F.M. does not work properly with
* sy-repid.
repid = sy-repid.
alv_variant-variant = pa_vari.
alv_variant-report = sy-repid.
alv_variant-username = sy-uname.
call function 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = repid
i_callback_user_command = 'USER_COMMAND'
is_layout = gs_layout
it_fieldcat = t_fieldcat[]
it_sort = gt_sort[]
i_default = 'X'
i_save = 'A'
is_variant = alv_variant
it_events = gt_events[]
is_print = tp_print
TABLES
t_outtab = IT_EXTRACT2
EXCEPTIONS
program_error = 1
others = 2.
if sy-subrc ne 0.
message w000 with text-004 ' ' ' ' ' '.
endif.
endform. " CALL_ALV
*& Form build_top_of_page
* Build heading for report. *
* -->P_GT_LIST_TOP_OF_PAGE[] Header stuff for report
form build_top_of_page using e04_lt_top_of_page type slis_t_listheader.
data: ls_line type slis_listheader. "Header table for top of page
* construct 'top of page' info. to display. In this case, one line.
data: w_selections(40) type c,
w_date_from(10) type c,
w_date_to(10) type c.
write: s_vdatu-low to w_date_from dd/mm/yyyy.
if s_vdatu-high is not initial.
write: s_vdatu-high to w_date_to dd/mm/yyyy.
clear w_selections.
concatenate 'Del.Req.Date: ' w_date_from 'To' w_date_to
into w_selections separated by space.
clear ls_line.
ls_line-typ = 'H'.
ls_line-info = w_selections.
append ls_line to e04_lt_top_of_page.
gs_list_top_of_page-typ = 'S'.
gs_list_top_of_page-info = ' Total number of Sales Documents'.
append gs_list_top_of_page to gt_list_top_of_page.
gs_list_top_of_page-typ = 'S'.
gs_list_top_of_page-info = count1.
append gs_list_top_of_page to gt_list_top_of_page.
else.
clear w_date_to.
concatenate 'Del.Req.Date: ' w_date_from
into w_selections separated by space.
clear ls_line.
ls_line-typ = 'H'.
ls_line-info = w_selections.
append ls_line to e04_lt_top_of_page.
endif.
endform. " build_top_of_page
*& Form alv_eventtab_build
* Pass list of events to be triggered by the ALV function module
form alv_eventtab_build using u_name type slis_alv_event-name
u_form type slis_alv_event-form
alv_lt_events type slis_t_event.
data: ls_event type slis_alv_event. " structure for event handling
ls_event-name = u_name.
ls_event-form = u_form.
append ls_event to alv_lt_events.
endform. " alv_eventtab_build
* FORM TOP_OF_PAGE *
form top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
i_logo = 'LOGO'
it_list_commentary = gt_list_top_of_page.
endform. " TOP_OF_PAGE
*& Form process_deliveries
* Process the delivery related records.
form process_deliveries .
data:
ltp_date type wadat_ist, " Goods movement date.
ltp_vbtyp type vbtyp_n,
ltp_mtart type mtart, " Material type.
w_lfimg type lfimg, " Actual quantity delivered (in sales units).
w_vrkme type vrkme. " Sales unit of measure.
* Read delivery quantity and uom.
select single lfimg vrkme into (w_lfimg, w_vrkme)
from lips where
vbeln = it_extract-delivery and
posnr = it_extract-posnr_vl.
* these fields have values from vbap. override with lips values
if sy-subrc = 0.
it_extract-kwmeng = w_lfimg.
it_extract-vrkme = w_vrkme.
* translate unit of measure
it_extract-mseh3 = it_extract-vrkme.
select single mseh3 from t006a into it_extract-mseh3
where spras = sy-langu
and msehi = it_extract-vrkme.
endif.
* Determine STATUS by reading 'service confirmation', R (goods movemt)
* it is possible to have multiple 'service confirmation' records for
* one item. ie. delivery 80010390 in PRD.
* As long as there is at least one 'service confirmation' record,
* status is considered 'complete'.
* Validate the created on date of the goods movement or service confirmation.
ltp_mtart = zcl_material=>get_mtart( it_extract-matnr ).
* ltp_date = zcl_lips=>get_goods_movement_date( itp_vbeln = it_extract-delivery
* itp_posnr = it_extract-posnr_vl itp_mtart = ltp_mtart ).
call method zcl_lips=>get_goods_mvt_info
EXPORTING
itp_vbeln = it_extract-delivery
itp_posnr = it_extract-posnr_vl
itp_mtart = ltp_mtart
IMPORTING
rtp_date = ltp_date
rtp_vbtyp = ltp_vbtyp.
* 'h' is cancel goods issue
if ltp_vbtyp = 'h'.
it_extract-statu = 'Incomplete'(025).
else.
if ltp_date is not initial.
it_extract-statu = 'COMPLETE'(026).
endif.
endif.
* Retrieve the invoice/billing document item.
call method zcl_lips=>get_invoice
EXPORTING
itp_vbeln = it_extract-delivery
itp_posnr = it_extract-posnr_vl
IMPORTING
rtp_vbeln = it_extract-bill_vbeln
rtp_posnr = it_extract-bill_posnr.
if it_extract-bill_vbeln is not initial.
* retrieve net value from the invoice.
clear it_extract-bill_netwr.
select single netwr into it_extract-bill_netwr from vbrp
where vbeln = it_extract-bill_vbeln
and posnr = it_extract-bill_posnr.
else.
it_extract-bill_netwr = it_extract-netwr. " Use order net value.
endif.
endform. " process_deliveries
*& Form user_command
* Process the user command.
* -->R_UCOMM User command
* -->RS_SELFIELD Field selected
form user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
data: ltp_vbeln type vbeln. " Sales document number.
case r_ucomm.
when '&IC1'.
if ( rs_selfield-fieldname = 'VBELN'
or rs_selfield-fieldname = 'BILL_VBELN' )
and rs_selfield-value is not initial. " Display sales document.
ltp_vbeln = rs_selfield-value.
zcl_sales_doc=>display( ltp_vbeln ).
endif.
endcase.
endform. "user_command
*& Form invoice_process
* Process for orders without deliveries. *
form invoice_process .
* Translate unit of measure.
select single mseh3 from t006a into it_extract-mseh3
where spras = sy-langu
and msehi = it_extract-vrkme.
* Retrieve the invoice/billing document item.
call method zcl_vbap=>get_invoice
EXPORTING
itp_vbeln = it_extract-vbeln
itp_posnr = it_extract-posnr
IMPORTING
rtp_vbeln = it_extract-bill_vbeln
rtp_posnr = it_extract-bill_posnr.
if it_extract-bill_vbeln is not initial.
* retrieve net value from the invoice.
clear it_extract-bill_netwr.
select single netwr into it_extract-bill_netwr from vbrp
where vbeln = it_extract-bill_vbeln
and posnr = it_extract-bill_posnr.
else. " If no Invoice, then status becomes 'incomplete'.
it_extract-bill_netwr = it_extract-netwr. " Use order net value.
it_extract-statu = 'Incomplete'(025).
endif.
endform. " invoice_process
*& Form alv_variant_f4
* Get the display variant.
* <--CTP_VARI Variant name
form alv_variant_f4 changing ctp_vari type slis_vari.
alv_variant-report = sy-repid. " Report ID
alv_variant-username = sy-uname. " User ID
call function 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = alv_variant
i_save = 'A'
IMPORTING
es_variant = alv_variant
EXCEPTIONS
others = 1.
if sy-subrc = 0.
ctp_vari = alv_variant-variant.
endif.
endform. " alv_variant_f4 -
Releasing credit sales order confirmation
Hi
We are using credit limit check. If the customer has credit issues, the sales order will get retained and the confirmation is lock. The issue is that after the released of the sales order the confirmation is not being unlock and the sales order is not taken into account by the filter of the backorder process.
Where should I verify that the sales order confirmation field is unlock at the moment of the credit release process?
Thanks a lot.Two places you can check in the sales order, click on the document flow button on the top. Then click on status button, expand the header status. Here you can see the credit status. The other place is go to menu Goto -> Header ->status. Here you can see the credit status field carries relevant information.
Regards, -
Finance documents - Letter of credit - sales order value than FD value?
Hi,
we are looking at this function of finance documents (ENLO, VN11n).
Scenario:
Sales Order value : 1 Mio USD
Finance Document value: 0.6 Mio USD
I want to create the FD document now fixed for the amount without specifiying an overdraft percentage (i.e. 100%).
Is it possible to cover this scenario?
Business reason:
We often have down-payments request issued at the beginning of the process and the amount might cover the gap. Or it is possible that credit limit of the customer covers the gap.
Thanks
HeinHi,
Yes, you can use the documentary payments functionality to cover a certain percentage of the sales document value. Balance will be considered for credit limit calculations. Check below link on how you need to configure this.
[LC|http://www.learnsaptips.com/2011/09/how-to-handle-letter-of-credit-in-sap.html]
Best regards,
Anupa -
Hello Experts,
I have Salesorder, customer, period infobjects in the ODS. In the report I need to show the Period, Customer, Number of sales orders.
Wondering if this possible. Could you please suggest me the methods to acheive this.
There is one 'Count' function in the CKF, Wondering if I can use that, in what way...
Thanks in advance.
BWer
Message was edited by: BWerCreate a new key figure (type number). Under the tab Aggregation, use SUM for Aggregation, Counter (values not =0) for Exception aggre and 0DOC_NUMBER for Agg.referen.char.
In the update rules, make 'Counter = 1'
On the front-end use 'exception aggregation' in the properties of this key figure.
That will give you a count of all unique occuences of the sales orders.
Kumar Gudiseva. -
Hi, i was looking for some help in regards to understanding the general rule of using the count function. I am trying to build my knowledge of the different functions in order for me to have a better understanding so that I am writing my sql queries in the right way.
What i was looking to find out was trying to understand the count function. As i understand I can apply the following in order to give me a count of a particular set of data.
select number, count(*) AS no_count
from test
group by job_id;What I am trying to understand is if for some reason I wanted to use the results of the "count(*) AS no_count" to give me another set of results i.e. sum all values over 2 for example, would i write it like the following:
select number, count(*) AS no_count,
select count(no_count) having etc...
from test
group by job_id;or is the general rule that I would have to write a select within a select?
If somebody could please help, would really appreciate it. Btw if there is any documentation on using count, as well as using this with other functions i.e. sum than that would be very useful as well.
Thanks in advance.Solomon, thanks for your help. Apologies if i have not explained my question properly. The problem is that I haven't created the tables and have wrote my sample data and i am then trying to work out solutions before attempting to create the tables etc, which is probably where I am going wrong.
The job_ids can be repeated, first job_count should give me total job counts belonging to each job_id.
For example in your first dataset you have a job count for all jobs i.e. manager has 3 records with 1 job_count. So I would then like a column to give me a total count of job_count for each criteria i.e. manager had 3 total jobs. I have tried to breakdown the dataset you have shown alongwith the extras I am trying to add, to hopefully explain what I am looking for.
JOB JOB_COUNT TOTAL_JOB_COUNT OVER_1
MANAGER 1 3 0
PRESIDENT 1 1 1
CLERK 1 4 0
SALESMAN 4 4 0
ANALYST 2 2 0
MANAGER 1 3 0
MANAGER 1 3 0
CLERK 1 4 0
CLERK 2 4 0
[/CODE]
So this tells from all jobs which job was dealt with first time so in this case it would be the president, the rest of the jobs were repeated.
The total_job_count would be written like:select job, count(*) as TOTAL_JOB_COUNT
but its the over_1 (or sum maybe, not sure) that is based on the results within the total_job_count that I need to look into to find values that equal to 1. Hence I thought I would have to write a count of a count, which is what I am not clear on.
Sorry for the inconvenience, and really appreciate your help and time.
Thanks
Apologies, not sure how to write the resultset as added but appears all over the place.
Edited by: 973436 on 17-Dec-2012 04:06 -
Hi Experts,
I want to count the number of times a perticular sales order has been changed.
For example, If I change the item quantity, then not only the quantity changes the scedulelines changes new pricing will carryout.
This means multiple changes will be recorded in CDPOS(Change history details) table. But I want to consider the above scenario as only one change.
Please advice.
Thanks,
Mohammed.Dear Jaleel,
In a sales order when you go to Envrironment--> Changes, you would find change in the schedule line.
Select that schedule line and click on ---> List on top of your screen you would find exactly what was changed and how much.
This should help solve your problem.
Please reward if helpful.
Thanks
Murtuza -
Why can't I redeem my itunes credit of over $50 I still have on account to buy a movie? It IS showing on my itunes page. I haven't had this problem in the past. Two weeks ago the Apple store in Omaha,NE reinstalled my Snow Leopard program. Would that effect anything?
Itunes verifies your account using billing info.
Maybe you are looking for
-
Unable to use HTML tags in the BPEL email component
Hi, I am using BPEL email component to send mail notifications. I want the email should be in proper format.If I use HTML tags the workflow application build fails .It says invalid syntax for html tags.So, I removed the tags and just using the concat
-
Does oracle jdbc driver 9.0.1 work with sdk 1.4?
Hi All Experts... Does oracle jdbc driver 9.0.1 work with sdk 1.4.1? Ever since i have moved to 1.4 i am having problems. I keep getting the No Suitable Driver error or NoClassDefFoundError. I have everything in the classpath and i have also tried co
-
How do I add copy/paste feature to websites I use
I have been trying to copy/paste info onto my Cafe Mom site, Firefox will not allow me to use this feature. It tells me to go to js file and add lines. I find the js folder but am unable to add any line
-
[solved] kmod, can't load nfnetlink module
Wireshark is busted for me because nfnetlink can't load for some reason. Also modinfo /lib/modules/3.2.0-2-ARCH/kernel/net/netfilter/nfnetlink.ko.gz was giving me a funky error, I went back to module-init-tools so I forgot what it said, but even modp
-
Hello I have an erro message come up when I try to start up iphoto, it suggests I reinstall it. Has anyone done this before? I originally down loaded iphoto by disc 3 or 4 years ago, i do not have the disk anymore. Can i uninstall iphoto and then buy