Quantcast
Channel: SCN : Unanswered Discussions - ABAP Development
Viewing all 8768 articles
Browse latest View live

change table value

$
0
0

Hello experts,

 

I handle SD instead of ABAP. However I got some questions related to ABAP. Pls help. Thanks.

 

Q1. Is it possible to change the value in field KOSTL of table LIPS? For e.g. KOSTL shows 123, any chance to change it to 456?

 

Q2. If the answer for Q1 is yes, how to change it, e.g. which Tcode, what is the process steps?

 

Q3. What is the impact for this kind of change?


ENCO tcode to allow user to change field value while printing smartform

$
0
0


Hi all,

 

    I have a custom smartform and what i want is that few selected fields of the smartforms should be amendable (ie their values should be allowed to modify by the user while printing the smartform). How to make this possible. I have heard that using ENCO tcode this requirement can be fulfilled. But I am not able to get any details on the ENCO tcode and the configuraton required for this.

 

Any help will be appreciated???

 

Thanks

Can we connect to another server?

$
0
0

hi, while creating table maintenance generator i want to connect to another server how to achieve this ?

 

thanks in advance

 

 

Regards

Reddy

/BODS/RFC_STREAM_READ_TABLE CALLBACK_FM

$
0
0

Hi,

i'm writing my thesis and extracting tables from SAP with JCO is a part of it.

Unfortunately i don't know much about ABAP, so i hope you can help me.

 

I want to use /BODS/RFC_STREAM_READ_TABLE, because if i understood correctly, it implements this method (RFC transport method - Enterprise Information Management - SCN Wiki) a therefore i won't have any problems with table widths and other restrictions.

 

This function module has two non optional parameters which are "QUERY_TABLE" and "CALLBACK_FM". The thing is i have no idea what i'm supposed to enter as "CALLBACK_FM".

 

Thank you for your help.

Header Names and totals for both rows and columns

$
0
0

Hello,

I am working on a program and am stuck on how to format the display using RTTS. I need to have both the rows and columns have titles.  Also I am basically swapping rows and column in terms of display for instance location 1 below would have  many values down each related to a particular field. The fields highlighted in yellow need to be actual field names. Is this possible with RTTS?

 

Capture3.JPG

Thank You Sara

                

open dataset space at the end of the character

$
0
0

Hi,

 

I know this question has been asked a couple of times and have already gone through all the posts.

 

using the open dataset filename for output in text mode.

 

I need a header line as below

 

HI1111ABC........ ( the dots represent spaces as the last character is 11 characters)

 

I have declared a work area and all is good till HI1111ABC but am not getting the spaces after that which gives an error on the target system

 

I have tried :

 

data : lv_space ( 8) type c.

 

lv_space = cl_abap_conv_in_ce=>uccp( '00a0' ).

concatenate work area lv_space lv_space lv_space lv_space lv_space lv_space lv_space lv_space into workarea.

 

the output is

HI1111ABCNULNULNUL instead of HI1111ABC........

 

CRLF at the end as that is getting displayed properly so the cl_abap_char_utilities=>horizontal_tab is not one of the options.

 

I have even tried :

data : lv_space type c.

concatenate work area lv_space lv_space lv_space lv_space lv_space lv_space lv_space lv_space into workarea.

 

no luck there also

 

Any suggestions what I am doing wrong ?

 

Thank you.

 

Narayani

BAPI_GOODS_MVMT_CREATE User locked

$
0
0

Hi ,

 

We are using  customized report (ZReport) for production order confirmation .

In this report  it internally calls Co11 transaction .

Goods issue happens through Co11 .And for certain conditions, good receipt is done  BAPI_GOODS_MVMT_CREATE.

 

Sometimes while running Zreport transaction , user gets message XXXXXXX locked by RFC_USER. Where  XXXXXXX is production order number.

 

 

1) when "BAPI_GOODS_MVMT_CREATE"  does not return error..... then BAPI_TRANSACTION_COMMIT with WAIT = 'X' parameter is used.


Please suggest solution , how to process with goods receipt when goods issue is already done.

 

2) In our Zreport, Goods issue is done via calling standard transaction and Goods receipt within ZREPORT .

Incase of error how can I revert the goods issue 

Error displaying date as column header in RTTS

$
0
0

Hi Alli,

   I have an output where I am using a sate for the column header in RTTS as below. I am getting a short dump when I get to line gr_struct_type ?= cl_abap_structdescr=>create(p_components = gt_component)  I  have tried making the field a Character, Sy-DATUM and Number. The dump states component name '02012015' of the component 2  contains an illegal character. I do not need the display format as I can change it before output, though that would be easier if it could be entered initiallly as is.

 

 

Capture 5.JPGCapture 5.JPG

I am working around this at the moment by formatting the date in my column output. Also to give my rows actual names the only solution I could think of was to make a field called with my row names in it. So in this case Field = "Total Sales" is there a cleaner solution?

 

Thanks,GeorgeCapture 5.JPG


smart form issue

$
0
0

Hi exports,

 

i have problem in smart form i am developing a new po in that po after main window i want display po  header text and

also display total amount and amount in words i get the logic but the problem is when i am displaying these created secondary

window  this window cumming every page i want display the window only once after the main window.

 

please help me 

Watch points

$
0
0

Hi friends,

         This is Nagarjuna. I am new learner SAP ABAP. Please share me what is the use of watch points in debbuggin and how to use ? I am waiting for your reply.

 

Thanks & Regards,

Nagarjuna S

Interview questions

$
0
0

Hai friends,

 

               Recently I have attended interview. In that interview, I have some questions.

 

1. How to debug (program or session) in background ?

2. Why you will go for BAPI for uploading the data instead of BDC ?

3. Why we are used watch points in debugging ?

4. How to use parallel cursor method ?

5. Ho to debugging the IDOC ?

6. Once IDOC is transaffered to production, then how to find out errors ? if any changes in IDOC where you can write the code ?

 

Please let me share answers for above questions.

 

Thanks & Regards,

Nagarjuna S

Warning Message in BADI ME_PROCESS_REQ_CUST method PROCESS_ITEM

$
0
0

Dear Experts,

 

I am trying to raise a warning message in BADI ME_PROCESS_REQ_CUST method PROCESS_ITEM.

 

But it never shows the warning at the time of creating the purchase requisition.

 

When i change the type as error message, it works fine but i need to throw an warning instead of error.

 

Kindly help me to resolve the issue.

 

Thanks,

Vijai

DELVRY03 IDoc user exit IDOC_OUTPUT_DELVRY - SAP46C

$
0
0

Greetings - I'm working within a SAP 46C ERP system, trying to extend the DELVRY03 IDoc with a custom segment (outbound processing for customer delivery). I finished all the IDoc related steps with WE30, WE31, WE81, WE82 and that's all fine. Now I'm to the point where I need find the user exit / enhancement attached to FM IDOC_OUTPUT_DELVRY to fill my custom segment. The best I've come up with is enhancement V56K0001 but that seems to be attached to transportation and is not used by IDOC_OUTPUT_DELVRY, we're using message type LAVA with process code DELV which uses IDOC_OUTPUT_DELVRY. I have search that FM and can't seem to find a call customer-function 'XXX' like I've done countless times for other areas i.e. IDOC_OUTPUT_INVOIC. Anybody have some direction on this from experience?

Calculating grandtotal on sapscript

$
0
0

Hi gurus I have an assignment to modify a Plant Maintenance picking slip.The customer wants the form to pick data from MM material master and then add a markup of 10% on the price field. The total price field should be quantity * unit price plus 10% markup.That i did.Now my task is to create the grand total for all line items. see images below

 

picki.png

pick.png

 

 

 

 

 

 

 

 

 

 

 

 

Below is my code snippet to calculate GrandTotal price.

 

 

TABLES: RESB, MBEW, MARA, MVKE, AUFK.

 

FORM calc_grandtotprice TABLES IN_PAR STRUCTURE itcsy

   OUT_PAR STRUCTURE itcsy.

 

 

 

   TYPES: BEGIN OF ity_total,

 

 

     grandtotprice TYPE MBEW-VERPR,

     MATNR      TYPE RESB-MATNR,

     BDMNG TYPE RESB-BDMNG,

     VERPR   TYPE MBEW-VERPR,

      STPRS  TYPE MBEW-STPRS,

   END OF ity_total.

 

   DATA it_total type standard table of  ity_total.

   DATA wa_total type ity_total.

 

 

 

   DATA: qty like RESBD-BDMNG.

   DATA: price(20), output_price(20), output_totprice(20),  output_grandtotprice(20), price_markup like MBEW-VERPR.

   DATA:grandtotprice like MBEW-VERPR.

   DATA: commission(16) TYPE P DECIMALS 2.

   DATA: tot_price LIKE MBEW-VERPR.

   DATA:material_no LIKE RESBD-MATNR.

   DATA:resnum LIKE RESBD-RSNUM.

   DATA: plant LIKE RESBD-WERKS.

   DATA: order_num LIKE RESBD-AUFNR.

   DATA: rpos LIKE RESBD-RSPOS.

 

 

   READ TABLE IN_PAR WITH KEY 'RESBD-RSNUM'.

   CHECK sy-subrc = 0.

   resnum = IN_PAR-value.

 

  READ TABLE IN_PAR WITH KEY 'RESBD-MATNR'.

   CHECK sy-subrc = 0.

  material_no = IN_PAR-value.

 

* READ TABLE IN_PAR WITH KEY 'RESBD-RSPOS'.

*  CHECK sy-subrc = 0.

* rpos = IN_PAR-value.

 

 

   qty = 0.

   price = 0.

   commission = '0.00'.

   tot_price = 0.

   grandtotprice = 0.

 

   IF sy-subrc EQ 0.

 

 

 

     Select * from RESB INTO CORRESPONDING FIELDS OF WA_TOTAL where RSNUM = resnum AND  MATNR = material_no .

       CHECK sy-subrc = 0.

    WA_TOTAL-MATNR = material_no.

     "WA_TOTAL-RSNUM = resnum.

 

  "WA_TOTAL-RSPOS = rpos.

       qty = WA_TOTAL-BDMNG.

 

 

 

       IF qty NE 0.

         SELECT SINGLE * FROM MBEW INTO CORRESPONDING FIELDS OF WA_TOTAL WHERE MATNR = WA_TOTAL-MATNR .

         CHECK sy-subrc = 0.

 

         price = WA_TOTAL-VERPR.

       ENDIF.

ENDSELECT.

endif.

       commission = ( 10 / 100 ) * price.

       price = price + commission.

       tot_price = qty * price.

 

 

 

grandtotprice = tot_price + grandtotprice.

*WA_TOTAL-GRANDTOTPRICE =  grandtotprice.

 

 

"LOOP AT it_total INTO wa_total.

"    WA_TOTAL-GRANDTOTPRICE =  grandtotprice.

 

READ TABLE OUT_PAR WITH KEY 'GRAND_TOTPRICE'.

   IF sy-subrc = 0.

     output_grandtotprice = output_grandtotprice + grandtotprice.

 

     write output_grandtotprice to OUT_PAR-value.

     MODIFY OUT_PAR INDEX sy-tabix.

   ENDIF.

 

 

ENDFORM.  

 

""""I have created a new wiindow for the grandtotal and below is the code snippet in sapscript

 

DEFINE &GRAND_TOTPRICE& = '0.0'.

PERFORM CALC_GRANDTOTPRICE IN PROGRAM ZCALC_GRANDTOTPRICE

USING  &RESBD-RSNUM&

USING  &RESBD-MATNR&

                                                                       

USING  &RESBD-RSPOS&

CHANGING &GRAND_TOTPRICE&

ENDPERFORM

 

TOTAL:&GRAND_TOTPRICE&

 

 

 

My challenge is that it is picking the total for the last line item only and i have tested using the debuger and am seeing that in_par is already populated by the 2nd line item instead of the first one.Where could i have gone wrong.

 

 

Regards

 

Rejo

Multiple selection - VBA

$
0
0

Hello All,

 

first of all, I hope that my English will be understandable.

 

Description:

I must create a report for sales orders by planned deliver date. Most of info what I need are in VBAP, but there is no delivery date there, only in VBAK. I download VBAK by VDATU, result is a list with 500-3k pcs of orders. Next step shouId be I take these order numbers and "insert" them into VBAP-VBELN, but I'm not able to find out how can I do it in VBA (multiple selection, therefore I download that by ERDAT (large interval, because the orders can arrive to system more weeks before delivery date). Result is a code what is downloading VBAP ~ten minutes... It is not acceptable. I would like to choose a simplier example (where problem is the same): MARA.

I have only 2-300 article number per list but I have to download 80k articles because I can filter only prefix and H% is not so exact filter...

One-dimensional array is the only one solution what I tried for that but RFC call is false in that case.

 

Sub MARA() '(user As String, password As String)

 

Const TABLA As String = "MARA"

Const UZI1 As String = "there is no connection to R/3"

Const UZI2 As String = "something wrong"

Const CLIENT As String = "300"

Const LANGUAGE As String = "your logon language"

Const SYSTEM As String = "your system"

Const user As String = "your username"

Const password As String = "your pw"

Dim Tomb As Long

Dim LTomb As Long

 

’store material numbers from A column of xls into matDatabank

    LTomb = Worksheets(1).Cells(Rows.Count, 1).End(xlUp).Row

    Tomb = 2

    If LTomb = 2 Then

matDatabank = "'" & Worksheets(1).Cells(Rand, 1).Value & "'"

    Else

Do While Worksheets(1).Cells(Tomb, 1).Value <> "" And Tomb < LTomb

matDatabank = matDatabank + "'" & Worksheets(1).Cells(Tomb, 1).Value & "', "

Tomb = Tomb + 1

Loop

matDatabank = matDatabank + "'" & Worksheets(1).Cells(Tomb, 1).Value & "'"

    End If

    matDatabank = Left(matDatabank, Len(matDatabank) - 1)

 

Set conn = CreateObject("SAP.functions")

conn.Connection.SYSTEM = SYSTEM

conn.Connection.CLIENT = CLIENT

conn.Connection.LANGUAGE = LANGUAGE

conn.Connection.user = user

conn.Connection.password = password

 

    retcd = conn.Connection.logon(0, True)

    If retcd <> True Then

     MsgBox UZI1, vbCritical

Exit Sub

    End If

 

Set RFC_READ_TABLE = conn.Add("RFC_READ_TABLE")

Set equery_tab = RFC_READ_TABLE.Exports("QUERY_TABLE")

Set toptions = RFC_READ_TABLE.Tables("OPTIONS")

Set tdata = RFC_READ_TABLE.Tables("DATA")

Set tfields = RFC_READ_TABLE.Tables("FIELDS")

equery_tab.Value = TABLA

 

toptions.AppendRow

toptions(1, "TEXT") = "MATNR IN" & "(" & matDatabank & ")"

 

’HM* selection needs more minutes because of huge amount of materials

'toptions.AppendRow

'toptions(1, "TEXT") = "MATNR like 'HM%'"

 

tfields.AppendRow

    tfields(1, "FIELDNAME") = "MATNR"

tfields.AppendRow

    tfields(2, "FIELDNAME") = "MATKL"

 

    If RFC_READ_TABLE.Call = True Then

MsgBox "success"

Else: MsgBox (UZI2)

    End If

  

conn.Connection.logoff

 

End Sub


Thank you for you help!


Regards,

Csaba


How to change Reference value while cancelling the invoice

$
0
0

Hi All,

 

I have a requirement in which we need to cancel the invoice. for that we are using FM: BAPI_INCOMINGINVOICE_CANCEL. but we need to change the Reference field(XBLNR) in the cancelled invoice. Now, it is copying the value present in the original invoice.

I tried using BAPI_INCOMINGINVOICE_CHANGE, but this is not working as it will change only for park documents.

 

Please suggest some ideas.

 

Thanks,

Spandana

Error Message in Z-report when using BAPI_OUTB_DELIVERY_CHANGE: Document is incomplete: You cannot save the delivery

$
0
0

Hi,

 

     I have created a Z-report which process all the saved deliveries. All those deliveries where quantity is not zero are saved successfully but if i want to save a delivery whose quantity is 0, the BAPI returns the message Document is incomplete: You cannot save the delivery. I am using VL01N t-code to create the delivery.

Below is the part of code i am using to save the delivery via Z-report.

l_del_no = wa_likp-vbeln.

 

wl_header-deliv_numb = l_del_no.
wl_header_chng-deliv_numb  = l_del_no.

 

CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
EXPORTING
header_data= wl_header
header_control = wl_header_chng
delivery  = l_del_no
TABLES
return    = li_return.

 

I had tried to search content but didn't find anything specific with VL01N.

Please help me in finding the ways so that i can save the delivery with quantity 0.

 

Thanks in Advance.

Prakhar Singh Chandel

Enhancement-Pt for ML81N before SAVE

$
0
0

Hi All,

 

I am trying to change item data from table ESLL in ML81N tcode (Service entry sheet). I read all the post i found in SCN. I came to conlusion that SMOD SRV* will not work for my requirement. I did find a post that says to create enhancemnt-point in include LMLSRFOF which triggers before save. But I was not able to access ESLL item data which i need to modify.

 

Can anyone suggest what enhancement points can access the item data ESLL?

 

Thanks in advance,

Karuna

Exit for Document Type(RPCAP-DOCTY) field validation in 9KE0

$
0
0

Hi,

 

I would like to validate screen field Document Type(RPCAP-DOCTY) (after entering value in screen)  in 9KE0 transaction. Please suggest if there any exits or any other way to do.I searched exisitng custome exits but nothing is suitable. Please suggest.

 

 

Thanks in advance.

Sunny

Drop down list box filter in table view in bsp

$
0
0

Hi all,

   I am using Table view filter for particular columns in table view in BSP Application. for on of the Column i am using drop down filter  to search for the values. While creating the values in the drop down list box i need some values selected by defaultin the drop down list box filter  based on some conditions.Please help me out.
   Thanks in Advance.

Regards,

Lakshmi.

Viewing all 8768 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>