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

SAP ABAP Smartform long standard text printing tab as commas

$
0
0

Hi Experts,

 

Need help on the issue decribed here. We were having problem printing standard text using INCLUDE text in smartform when text is very long like 1000+ lines  inside a TABLE command (Printing operation text of Operations table of work order) with a custom paragraph format . It gave the error like SSFCOMPOSER250 - Table row is larger than 176 cm. (Solved this by using link http://wiki.scn.sap.com/wiki/display/ABAP/SSFCOMPOSER250%3A+Table+row+is+larger+than+176+cm ). So I have replaced include text with READ_TEXT FM for reading standard text key lines and printed each line of the standard text using TEXT ELEMENT using a loop in SMARTFORM. However, now the tab/tabulator appears as double commas (,,) and is not converted as tab while printing.

 

Also, the alignment/indentation is also not achieved. Tried using some FMs like CONVERT_TEXT and CONVERT_ITF_TO_ASCII to convert standard text to ASCII format. But the indentation is not achieved like in INCLUDE TEXT. As per my understanding Standard text is stored in ITF format and is converted while printing using INCLUDE TEXT. But with TEXT ELEMENT it is printing as is and tab/other SAP character information is ignored/ not converted. The main problem is here tabs align/indent the text when using INCLUDE TEXT, but here tab information is lost (have double commas). Tried REPLACE also but it compressed extra spaces. Could you please guide on how to fix the issue.

 

Need your help and its urgent !

 

Thanks in Advance,

Aditya


how to add new fields in BDC rules need to follow

$
0
0

hello experts i m adding some new fields in already generated bdc screen no. check tables check but when m trying to add some field there its data goes to another field i want to know exect metthod to add new fields in bdc

How to Navigate back to Notification Header tab programatically.

$
0
0

Hello All,

 

 

I have one query with respect to navigating back to a particular sub-screen/Tab-strip .The requirement is when ever we save a notification at the time of creation/change a pop-up message should be thrown up with two option Yes & No. When we click on Yes it should always take us back to Notification header data with out saving the notification and if we click on No button the notification should be saved. This logic is build in the Customer Exit.

 

I have got the customer exit and the entire logic in place. Unfortunately I'm not able to navigate back to the Header data of notification tab when I click on Yes in pop-up message. I used leave screen but it will take me back to the screen from where I saved the transaction but my requirement is to always navigate back to Notification Header data tab irrespective of from which screen I'm saving the data.

 

 

Please find attached Screenshots with the screen status and notification for your reference.

 

Appreciate your quick help on this.

 

Thanks in advance..!!!

Validation for FBV0 while posting documents

$
0
0

Hi,

 

            While posting documents in FBV0 I want to keep validation for username, I am knew to BTE's  tried with BTE no 1020 but it is not working, so how to find the exact BTE there are no proper user Exits or BADI's because in BADI (FI_HEADER_SUB_1300) BELNR is not coming. So how to do this?

 

 

Regards,

Avinash.

2D Barcode (Aztec) display in smartforms

$
0
0

Hi,

 

I want to display a label in Smartform which should be a 2D barcode (Aztec).

Can anyone please help me out with the steps I need to follow in order to achieve it.

Problem with FI_PDF_ADVICE_OUTPUT

$
0
0

Hello Experts,

 

I am required to get both a spool and the PDF data from the FM FI_PDF_ADVICE_OUTPUT. The FM allows me to pass I_XGET_PDF to get the corresponding XSTRING and SOLIX data, but at the same time disables the creation of a spool.

 

I need both, is this possible?

 

Thank you very much.

 

Regards,

Marc

 

Released Function Modules for working day calculation

$
0
0

Hello Team,

 

I looked into function group SCAL / TB01 / KEPC. I could not find a function module that is released by sap for following purpose. There are many Not Released function modules.

 

I even tried to look for other threads before posting this one.

 

My requirement is -

 

If I enter date,based on Factory Calendar I would like to know 6th ,5th  and 4th working day before entered date.

Like for example if I entered July 10 and factory calendar is US. so I would like to output will be 6th Working Day = 1 Jul, 5th Working day = 2 Jul and 4th working day = 6 Jul.

 

I am sure someone might already faced this problem. Please revert with ideas.

 

Thanks,

How to make a field *(red) as mandatory after caption field in Adobe forms

$
0
0

Hi All,

 

I want to make a field as mandatory in Adobe form PDF output i.e in output it should look as xyz:* and the (*) should be in red color but when i tried it looks only in black color in output.

And also in PDF form when user clicks on save button without filling the mandatory field it should throw the error message pop up as field is mandatory(how to achieve this using the java script) in adobeform.

 

Can any one please help me regarding the same.

 

Thanks,

Revanth


Find code that is changing VBAK-NETWR

$
0
0

We have a strange scenario where the value of VBAK-NETWR VA01 Net Value seems to be added to itself, occasionally.

 

(e.g. In an advanced returns with references, after you confirm a mateiral and qty, if the value was 101.50, it then becomes 203. and then 304.50, as you navigate around the VA01 transaction,)

 

The situation appears in order tyoe RE2 (advanced returns) as we've noticed so far, and not in all of those orders, either.

 

I'm trying to locate what code or config might be causing this incorrect increase to show on the screen (and in the db).

 

My main question is what tools might I use to determine exactly where in the code this is happening?  I've used SAT to trace and examine the call hierarchy, etc., and I've used debug with various watchpoints.  No luck in these tools witnessing *exactly* which line of code increases any VBAK-NETWR or related temp field, etc

 

Any other thoughts as to how I can figure out what might be changing this?  Could it be some config.?

 

Thanks

Jeremy H.

After create index can not find all data

$
0
0

Hi everyone

 

I created an index for a table and after I run a program that select data from this table with created index.

Unfortunately after running the program, not all data is selected, it brings less data then before index was created.

What am I doing wrong?

 

Thanks

Header of positions is not comming on the pages 2 to the end

$
0
0


Hi all,

 

i have one smartform i want to display header in main window for every pages , for that i have two different header line in table .

first line is printing but second line is printing only on first page not from second to end .

 

Please check screen shot below

SFFirst.JPG

First Page of Smartform

 

SFSecond.JPG

Second page of Smartforms

 

and output of this smartforms is below

 

form1.JPG

Here all heading is printing correctly

 

Form2.JPG

From second pages second line header is not printing

 

Form10.JPG

And last page is also same like second without printing of second line header print.

 

Please help..

 

Thanks,

Mahipal

Find and display duplicate records from ITAB

$
0
0

Hi Friends,

 

I have requirement to display duplicate records from itab

for example : Itab1 is contains duplicate records.

Column
AAA
BBB
AAA

 

I want display records like

TextColumn1
Duplicate recordAAA
BBB
Duplicate recordAAA

 

Please suggest me.

Here it's Updated.....

$
0
0

Hi Again,

SAP has provided a tool, where useinfo.JPG, with the use of this tool, we can search objects like a table has been used in which are the objects, like Program, FM, Class, etc.

 

 

But if a user wants to check a particular value has been updated under which are the tables.

 

Sometime, user needs to check a particular value are coming from which table, and for that, an ABAPer do debugging in respective program to check the value is coming from which table.

 

Here is a very sort program, which provides result of Table and Field Name, where the entered value has been stored or updated.

Input:

info.JPG

 

For the testing purpose I have provided a text30 data element as input field.

 

Based on entered value, logic will search all table from system and check the entered value in each and every columns. Yes, the program will call respective table again and again, but I have put some more restriction like only considering CHAR and NUMC columns.

 

And again, selecting only columns where the columns output length is more then and equal to entered value.

 

Note: since internally calling a table multiple time, so based on data it could table some more time to execute and provide the final result. Would suggest execute the program in back-ground. So at last you will get the final result set.

 

The output will be as below.

info.JPG

 

And in respective table search,

info.JPG

 

Code is in attachment.

 

Happy Learning..

Praveer

Printing actual size of PDF with Adobe forms

$
0
0

Hello fellow developers,

 

Do any of you know how to print an adobe form with its actual size on A4 for example (the page is set to 1.7 in X 2.3 in). If I print this PDF form at my printer, which has only A4 paper, it will resize it automaticlly to A4 instead of the size I gave it.

 

I have tried with every combination of options in the SFP -> ZFROM -> Layout -> Edit -> Form Properties -> PDF Print Options ( No page scaling and/or Select Papers Source by paper size).

 

It must be a specific configuration, a combination of options, that i don't know.

SET_TABLE_FOR_FIRST_DISPLAY

$
0
0

Hi Gurus,

 

do I have access after calling the method SET_TABLE_FOR_FIRST_DISPLAY to the table in it ? I'd like to modify it before refreshing (I don't know the name of the table). I'd like to delete some rows in it ...

 

Thanks a lot for helping  !

 

Kind regards   Peter


FM to get Material Number along with Plant details & Business Unit

$
0
0

Hello,

 

    I am looking for a function module, where my input parameters will be Material Number, Plant and in return I want to get Plant details (if any further Plant ID extended with Material Number), Business Unit respect to each Plant ID etc.

how to use copies window in smartforms

$
0
0

Hello

 

I have a requirement in which i am fetching data from NAST table based on vbrk-vbeln value.

After that my requirement is i am checking if the output type is ZD29 OR ZD30 and status is 0. i need to print ORIGINAL. IF the output type is other than ZD29 and ZD30 than i need to print DUPLITCO.

 

I have written the below code. i have create a copies window but still it is not working.i need to print only at first page header these texts.

Can anybody help

 

 

IF gs_vbrk-vbeln IS NOT INITIAL.

 

   SELECT SINGLE objky kschl vstat FROM nast INTO gs_nast

      WHERE objky = gs_vbrk-vbeln.

 

  IF sy-subrc EQ 0.

  IF ( ( gs_nast-kschl EQ 'ZD29' OR

       gs_nast-kschl EQ 'ZD30' )

         AND gs_nast-vstat EQ 'ZERO').

           LV_TEXT1  = 'ORIGINAL'.

         ELSEIF  gs_nast-kschl NE 'ZD29' OR

       gs_nast-kschl NE 'ZD30'.

              LV_TEXT1 = 'DUPLICTO'.

   ENDIF.

  ENDIF.

  endif.

 

Thanks

Asha

Return mail not comming if recipient email id is invalid

$
0
0

Hi,

 

I have written the email triggering code well. Emails are going properly. But the email id is wrong then no return email is coming to sender's inbox where as in SOST its giving error that "invalid recipient email id".

 

How can I get the return mail. Please help me out.

LOOP in LOOP, (self loop) performance tuning ?

$
0
0

Hi ABAP folks,

 

Can you please advise on the below code. My transformation program is taking 55 minutes to complete 1 round for 100,000 records....which is very bad coding. I am not good in abap. Can you please help me to fine tune the below code for optimum performance. I know its difficult to understand other's code without the actual scenario . But at-least at a high level any suggestion's like using field symbol's or sort or binary search any key words is much appreciated. I will be great at-least if it comes down 15 minutes.

 

If you need more details, I can update you. Basically this is written in the end-routine of the DSO. to get the add quanity and sub quantity of the material's based on the material movements and to get the price of the material's in the 2nd block based on the PO amount and Material amount.

 

 

      LOOP AT RESULT_PACKAGE ASSIGNING <fs_rp>.

        CLEAR: subqty, addqty, wa_ITAB1, WA_ITAB2, WA_ITAB3.

 

        LOOP AT it_ITAB1 INTO wa_ITAB1 WHERE PLANT =

        <fs_rp>-PLANT

        AND MATERIAL = <fs_rp>-MATERIAL

          AND PSTNG_DATE = <fs_rp>-DATE0.

 

          IF wa_ITAB1-MOVETYPE EQ '312'.

            addqty = addqty + wa_ITAB1-QUANT_B.

 

          ELSEIF wa_ITAB1-MOVETYPE EQ '202'.

            subqty = subqty + wa_ITAB1-QUANT_B.

          ENDIF.

 

        ENDLOOP.

 

        <fs_rp>-/BIC/YIO_ADD = addqty.

        <fs_rp>-/BIC/YIO_SUB = subqty.

 

*Calculating material price in the below code

 

        IF <fs_rp>-/BIC/YIOFLAG EQ 'Y'.

 

          READ TABLE it_ITAB2 INTO WA_ITAB2 WITH KEY MATERIAL =

          <fs_rp>-MATERIAL.

 

          IF SY-SUBRC = 0.

<FS_RP>-/BIC/YIOQNTPR = WA_ITAB2-NETPRICE.

<FS_RP>-LOC_CURRCY = WA_ITAB2-LOC_CURRCY.

          ENDIF.

 

        ELSEIF <fs_rp>-/BIC/YIOFLAG  EQ 'N'.

 

          READ TABLE IT_ITAB3 INTO WA_ITAB3 WITH key MATERIAL =

          <FS_RP>-MATERIAL

          PLANT =  <FS_RP>-PLANT

          CALMONTH = <FS_RP>-CALMONTH.

 

          IF SY-SUBRC = 0.

<FS_RP>-/BIC/YIOQNTPR = WA_ITAB3-PRICE_VAL.

<FS_RP>-LOC_CURRCY = WA_ITAB3-CURRENCY.

          ENDIF.

 

        ENDIF.

 

 

      ENDLOOP.

 

Thanks

DR

ALV Grid Right/Left Justify

$
0
0

All,

 

I have a requirement to display Contracts and related Sales ORder in the same ALV Grid. In order to better display, they want Contracts to be displayed  as left justified and Sales Order as Right justified. How do we achieve this functionality. Both the values are in same column but in different rows.

 

Untitled.jpg

 

Regards,

Salil

Viewing all 8332 articles
Browse latest View live


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