Quantcast
Channel: SCN: Message List - ABAP Development
Viewing all 10425 articles
Browse latest View live

Re: Rows to Column Conversion in ABAP

$
0
0

Hi Ginee,

 

For my solution to be feasible, i assume that all the possible values of column 2 i.e. Work Week should be finite and known before we execute the program. If yes, then do as follows,

 

1) Sort the internal table by part workweek.

2) Loop at the internal table and compare the value of Workweek and on the basis of work week populate the quantity value in the field.

 

Code example.

Suppose you have 5 work weeks,

then

 

 

lt_data is

 

 

PartWorkWeekQty
A1001301100
B1001302200
C1001304300
A1001305200
A1001306100

 

 

 

 

*-- Final Data Table

 

data : begin of ty_final,

part type .....

ww1301 type <quantity type>,

ww1302 type <quantity type>,

ww1304 type <quantity type>,

ww1305 type <quantity type>,

ww1306 type <quantity type>,

end of ty_final.

 

sort lt_data by part workweek.

 

loop at lt_Data into ls_Data.

 

if ls_data-workweek = 1301.

ls_final-ww1301 = ls_Data-qty.

elseif ls_data-workweek = 1302.

ls_final-ww1302 = ls_Data-qty.

elseif ......

.

.

.

.

<Continue till all the work weeks>

 

at end of part.

 

append ls_final to lt_final.

clear : ls_final.

 

endat.

 

endloop.

 

 

Revert if something is not clear.

 

BR,

Ankit


Re: Rows to Column Conversion in ABAP

$
0
0

How many columns do you think you need ?

 

The reason I am asking is that is much easier to prepare a structure with known number of entries.

 

Regards.

Re: Inner join with SELECT *

Re: Rows to Column Conversion in ABAP

$
0
0

I suggest you create a structure with 52 fields.

 

(I am at home so the code is not compiled or tested)

 

Name the fields like:

 

qty_01

qty_02

.

.

qty_52.

 

 

When you read it_zdemo

 

you can generate a name using: 

 

concatenate 'qty_' WorkWeek+2(2) into fieldname.

 

and then use assign to put the value in the correct qty_ field.

 

regards.

Re: How to validate data when press enter or save in maintenance view

$
0
0

Hi

In the screen layout - flow logic tab,

 

You will see a auto generated code as

 

LOOP at <your internal table>

CHAIN

  ......

   FIELD ........

   FIELD .............

  .....

ENDCHAIN

ENDLOOP

 

 

at end of the FIELD statement  -- Add a statement as MODULE <your_validation_function_name>.

 

Example:

 

 
    CHAIN.

      FIELD ZLCHDR-BONDID MODULE CHECK_ATTRIBUTES_BOND.
      FIELD ZLCHDR-PROJID MODULE CHECK_ATTRIBUTES_PROJ.

 

 

In the main program

 

MODULE <your_validation_function_name>

 

    ****wRITE HERE YOUR LOGIC TO VALIDATE

 

ENDMODULE

 

Regards,

Venkat

Read Https website content using report program

$
0
0

Hi ,

 

I need your help experts. I need to validate website url and read its content. For example http://www.google.com.

I am able read non https url content but when I am trying to read content for https url my below code is not working like https://www.google.com its not working but url is validate. How do i read https website content without certificate download

 

Below is my program please suggest.

 

DATA: http_client TYPE REF TO if_http_client .

 

DATA: wf_string TYPE string ,

 

result TYPE string ,

 

r_str TYPE string .

 

DATA: result_tab TYPE TABLE OF string.

 

START-OF-SELECTION .

 

  CLEAR wf_string .

 

wf_string = 'https://www.google.com'.

 

 

  CALL METHOD cl_http_client=>create_by_url

    EXPORTING

      url                = wf_string

    IMPORTING

      client             = http_client

    EXCEPTIONS

      argument_not_found = 1

      plugin_not_active  = 2

      internal_error     = 3

      OTHERS             = 4.

 

 

  CALL METHOD http_client->send

    EXCEPTIONS

      http_communication_failure = 1

      http_invalid_state         = 2.

 

 

  CALL METHOD http_client->receive

    EXCEPTIONS

      http_communication_failure = 1

      http_invalid_state         = 2

      http_processing_failed     = 3.

 

  CLEAR result .

 

  result = http_client->response->get_cdata( ).

 

 

  REFRESH result_tab .

 

  SPLIT result AT cl_abap_char_utilities=>cr_lf INTO TABLE result_tab .

 

  LOOP AT result_tab INTO r_str.

 

    WRITE:/ r_str .

 

  ENDLOOP .

 

Thanks,

NJ

Re: Regarding Table Content in Module Pool

$
0
0

Thanks to all of u guys ..for your helps and ideas of this issue.......

Re: Rows to Column Conversion in ABAP

$
0
0

Hi ,

 

Total  Columns  for work week is 52 (1  year) , column name for work week cannot be determined,  the column name for the work week

  based on date selected, example :

 

Date Selection : -

 

Date : 31.05.2013

 

 

Work Week for 31.05.2013  is 22 -2013.

 

So the Work Week Start from 22 -2013  -----> 22-2014 ( 1 year)

 

 

 

Part WorkWeek Qty
A10022-2013100
B10023-2013200
C10024-2013300
A10022-2014200

 

 

Part22-201323-201324-201325-201326-2013
                UNTIL
22-2014
A100100200
B100200
C100300

Re: Rows to Column Conversion in ABAP

$
0
0

Hi

 

How to making the column name for work week dynamic? 

work week based on the date we  select on the calendar

Re: Rows to Column Conversion in ABAP

$
0
0

Hi Ginee,

 

Then you need to go for dynamic internal tables since column names are not fixed.

 

Please search for dynamic internal table.

 

 

-> Please ignore this.

 

BR,

Ankit.

Using Vendor master and SAP Script

$
0
0

Hi,

 

I got a new requirement using Vendor master. That is to

Create a new program for vendor details. This program is useful to send the vendor details by mail to any mail ID given in the selection Screen. The program should able to handle the multiple vendors in a single selection.

 

Main Logic is :

Fetch the data from the Vendor master table and use a sap script.

send the same spool to email mentioned in the selection screen.

Print should be handled in the login language.

 

Pls help me by some ideas.

Re: FBU3 - Cross Company Transactions Overview.

$
0
0

Hi Susmitha,

 

I tried that too. But it still only displays one line item details at a time.

The user wants to see the overview of all the line items in one list.

 

Regards

Piyush.

Re: problem in FB01

$
0
0

thanks for the reply,but i dont have two rows,i have a single row only.

 

i have a format of my input as below.my problem is it should create two document numbers by running BDC for FB01 one for doc type "DED_PF" and second for doc type "COMP_PF"  taking same employee no,pf number,basic.

Employee No.NamePF NUMBERBASICDED_PFCOMP_PF

 









5318DEEPAK KUMAR AGARWALUP379/345124,733.29682427

Re: FBU3 - Cross Company Transactions Overview.

$
0
0

Hi Prabhu,

 

Thanks for your reply.

I did exactly that but it gives a classic alv output display per record.

So even if i put it inside a loop i need to be able to store/combine all (over a 100) alv output displays..

 

Still trying to figure that out.. any help on that wud be appreciated.

Re: Populating and defaulting dropdpwnlist

$
0
0

Thanks Ankit,

IF gt_vrm_values IS NOT INITIAL.

But this is not the case.. gt_vrm_values has values.

 

I am able to load both the drop dwon on the first fly.

 

The second dropdown has values, but default value is not set.


Re: Automatically pick a value when other value is entered in a standard tcode

$
0
0

Hi Ankit,

 

I appreciate your reply. I have confirmed with the functional guy. The vehicle number would be same for all the records in items.

 

The following is the code:

ENHANCEMENT ZZVEHICLE_NO.    "active version

data: zveh_no type zwb_carrier3-veh_no.

 

select single veh_no from zwb_Carrier3 into zveh_no where wid1 = lips-kdmat.

ENDENHANCEMENT.

 

Its not working. In the debugging mode, lips-kdmat does not have any value so query is not working. And it does not have any value because I have not entered yet.

 

 

 

Regards

Purnand

Re: How to validate data when press enter or save in maintenance view

$
0
0

Hi Prabhu,

 

I have not checked for duplicate entries, I just tested whether the validation is possible or not and throwing an error message at event 5 or 1. And if the duplicates is the case, in my code after "SELECT" statement read the Itab with the current entered key like,

 

SELECT * FROM YTEST_EMP INTO TABLE LT_TAB.        "Here we get entries maintained so far.

 

READ TABLE LT_TAB WITH KEY <field_to_compare> = <key>.

IF SY-SUBRC NE 0.

    MESSAGE E.

  ENDIF.

 

Note :: YTEST_EMP is the table on which we are maintaining view.

 

As you said, event 01 and 05 should workout actually.

 

--Vijay

Re: Text in Subcontracting Challan(Nature Of Processing).

Re: Testing and comparing internal table content

$
0
0

Hi, Krzysztof,

 

1, Try to download the before internal table to local named with 1.xls ( Microsoft Excel format ).

2, Download the second internal table to local named with 2.xls ( Microsoft Excel format ).

3, Use the excel funcion "IF".   =if(a1=b1,"","NOT THE SAME").

 

Below is the description of 'IF' function.

The IF function returns one value if a condition you specify evaluates to TRUE, and another value if that condition evaluates to FALSE. For example, the formula =IF(A1>10,"Over 10","10 or less") returns "Over 10" if A1 is greater than 10, and "10 or less" if A1 is less than or equal to 10.

Re: PMCO costs updated occasionally via RFC call

Viewing all 10425 articles
Browse latest View live


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