Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all 8332 articles
Browse latest View live

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

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

ABAP Editor settings?

$
0
0

Hi,

 

Our SAP is EHP6 and BASIS is 731 w/ 4.

 

Pls. let me know how can I get the below settings / features?

 

1) Say, I declared as below

 

DATA lv_matnr TYPE matnr.

DATA ls_mara TYPE mara.

 

So, when I use these (lv_matnr, lv_mara) in my ABAP programming then the ABAP editor pops me (tool tip kind) helps me to populate / suggest them, the moment I typed lv_ .....

 

Pl. let me know where is the setting I need to do?

 

2) See below comments in red box, as soon as put this class/method automatically am getting the variable's labels, how can I get for me?

 

aaaaaaaaaaa.jpg

 

Thank you

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?

Data Allignment not appearing correctly using class method

$
0
0

Hi ,

 

In my 'XLS" attachment data alignment is not appearing correctly when using classes.please let me know what needs to be done.

 

below is the code.

DATA : lt_att_content_table TYPE soli_tab,

          ls_text              TYPE soli.


CONCATENATE 'USERID' 'USER NAME' 'PS No.'

         INTO ls_text SEPARATED BY cl_abap_char_utilities=>horizontal_tab.

       APPEND ls_text TO lt_att_content_table.

       CLEAR:ls_text.

 

       LOOP AT gt_usr02_attach INTO gs_usr02_attach.

         CONCATENATE gs_usr02_attach-userid gs_usr02_attach-ename

                     gs_usr02_attach-pernr

          INTO ls_text SEPARATED BY cl_abap_char_utilities=>horizontal_tab.

         APPEND ls_text TO lt_att_content_table.

         CLEAR:ls_text.

       ENDLOOP.

**mail cc to HR

 

 

       lv_attach_name = 'SAP Logon Details.xls'.

       CALL METHOD lref_document->add_attachment

         EXPORTING

           i_attachment_type    = 'XLS'

           i_attachment_subject = lv_attach_name

           i_att_content_text   = lt_att_content_table.


Screenshot in the attached xls file.:

screen1.jpg

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.


Profit centre and Special purpose ledger documents for IDOC basic type FIDCCP01(message type FIDCC2)

$
0
0

Hello Everyone,

   

         I need to generate both CO and Profit Centre documents along with FI documents using IDOC basic type FIDCCP01(message type FIDCC2).  For this I created a new Z subset and assigned the componenets 'FI', 'GLFL', 'RK-1' in table TRWPRC. But after re-processing the Idoc only the FI and controlling documents are generated. I need the Profit centre and Special purpose ledger documents also. How could I generate the Profit centre and Special purpose ledger documents for  IDOC basic type FIDCCP01(message type FIDCC2) please. Can I generate  Profit centre and Special purpose ledger documents based on maintaining additional configurations  in table TRWPRC or is there any other method please.

 

Thanks & Regards,

Jenny

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

Blocking of PO Line Item

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

Can you loop on a deep-structure itab within Smartforms?

$
0
0

I know that Smartforms lets you pass a table to Smartforms and that you can loop on this itab.

 

But suppose the itab has deep-structure - each row has another itab in it.  (This is common, for example, in APO.)

 

Then within the outer loop on the outer itab, can you loop on the inner itab within each row?

 

Thanks for your kind advice here.

what values can this paramater take " DISVARIANT-VARIANT " ?

$
0
0

Hi all,

 

I have a report with this only parameter :

 

PARAMETERS: VARIANT LIKE DISVARIANT-VARIANT.

 

I want to execute this program to see a simple ALV grid , but do not know what value can I enter as input .

 

Any help will be appreciated.

 

Thank you.

Core Data Services (CDS) ABAP Feature Matrix

$
0
0

With SAP NW ABAP 7.4 SP5 the first instalment of Core Data Services (CDS) support in ABAP was delivered (see New Data Modeling Features in SAP NW ABAP 7.4 SP5). Since CDS is a relatively new technology, new features are constantly being added. Below is a short overview of which features were released with which SAP NW ABAP 7.4 support package. For details about the features you should check out the 7.40 ABAP Keyword Documentation.

 

Core Data Services (CDS) ABAP View Building

 

Featuresince SAP NW ABAP 7.4 SP5since SAP NW ABAP 7.4 SP8
SQL Joins
  • INNER JOIN
  • LEFT OUTER JOIN
  • RIGHT OUTER JOIN
SQL Set Operations
  • UNION
  • UNION ALL
SELECT Clauses
  • WHERE
  • GROUP BY
  • HAVING
  • AS
Aggregate Functions
  • AVG
  • MAX
  • MIN
  • SUM
  • COUNT( DISTINCT )
  • COUNT( * )
Literals
  • In SELECT list, e.g.: 'literal' AS fieldName
  • As RHS value
Arithmetic Operators
  • +
  • -
  • *
  • / (Float-based division)
Numeric Functions
  • CEIL
  • MOD
  • ABS
  • DIV (Integer-based division)
  • DIVISION (Decimal-based division)
  • FLOOR
  • ROUND
String Functions
  • SUBSTRING
  • LPAD
  • CONCAT
  • REPLACE
Other Functions
  • CAST to built-in DDIC types, e.g.: abap.fltp
  • COALESCE
  • CURRENCY_CONVERSION
  • UNIT_CONVERSION
  • DECIMAL_SHIFT
Conditional (CASE) Expressions
  • "Simple" CASE (behaves like switch statement)
  • Nested CASE statements
  • "Searched" CASE (behaves like if ... else if)
Conditional Expressions
  • Boolean Operators
    • NOT, AND, OR
  • Comparison Operators
    • BETWEEN, =, <>, <, >, <=, >=, LIKE
    • IS [NOT] NULL**

 

**Only in WHERE conditions

Extensibility

$EXTENSION.* (support for database table extensions)

EXTEND VIEW**

 

** Added elements cannot be input parameters, path expressions or aggregate expressions

(Unmanaged) Associations
  • Path expressions in
    • SELECT list
    • FROM clause
    • WHERE clause
    • HAVING clause
  • Filter conditions in path expressions, e.g.: products._texts[ langu = 'EN' ] as english_name

"Core" Annotations

  • End-user Texts
  • (Implicit) Client Handling
  • SAP Buffering
  • Reference Fields for amounts/quantities
  • Data Aging
  • Compiler (compare filter conditions of path expressions to reduce number of JOINs)
Other
  • KEY elements
  • Input parameters

Append column to structure at runtime

$
0
0

Dear all,

 

I'm currently working on a strong problem where I need a new column in internal table.

 

So there is a standard transaction where the output is a fixed table structure which cannot be enhanced. No Append is possible.

 

Because of this I want to add a new column to the already existing strcuture during runtime.

 

Following example:

 

Data: wa_bkpf type bkpf.

 

*Now I want to add a new column to the structure.Lets say I want a new column "LIFNR" so that I can add a value to this.

 

wa_bkpf-lifnr = '12345'.

 

Is this possible?

 

Br

ALV Grid grouping with a checkbox

$
0
0

Hello,

 

I have an ALV grid that displays customer master data, which is grouped by customer number. I added a custom check-box to the table and the grouping disappears when the check-box is made editable. Is there a way to have a custom check-box for each grouped customer number that is editable?

 

Thanks,


Zach

Read and convert Word document in PDF form.

$
0
0

Hi All,

 

I have a requirement wherein i need to read a word document and convert the same into PDF format.

Basically the means that I'm looking into is using two standard reports:

 

1. RSPO0068 - To convert the document into a spool request.
2. RSTXPDFT4 - Then use this report to convert the generated spool request into PDF format.

 

Using the above method I'm able to generate the document in PDF format, but when I'm trying to open that document, it is giving me an error saying "Can not open document, file has no pages".

If anybody has any idea related to the same then kindly let me know what is going wrong and how can this be rectified.

 

Thanks,

Abhishek

BDC REOCRDING in Module program.

$
0
0

Hello guys.

 

I have a requirement to update standard reports through my customized program so thats why I created a recording of Fb50 and want to add this recording into my Module pool customized program, but When add this It Giving me a error of "FORM "BDC_DYNPRO" does not exist" So add include bdcrecx1 which i commented before , so then it gave me error of  "Within FORM routines and function modules, the SELECTION-SCREEN  statement is not allowed." 


Please guide me in this regard .

 

Waiting for your response.

 

 

Thanks

need find delivary address by plant level in me21n by plant level

$
0
0

Hi abapers,

 

Here my issue is :in my project,  plant address had changed to city address (new) from old city address.

 

here we maintainte 2 servers . 1.velocit

                                                  2. fusion

 

 

in velocity server while creating PO(ME21N) , when we give plant the new address has came in item level in delivary address tab

 

my issue came here

 

in fusion while creating PO(ME21N) , when we give plant the new address has not came in item level in delivary address tab the old address is coming , it shd come new address( what we change nw plant address from old address)

 

 

how to debug me21n in that so many includes are there which one is suitable' include' for delivery address (in item level) by plant to debug.

 

plz suggest me abapers

Viewing all 8332 articles
Browse latest View live


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